From 739ebff3341acf1eb68eb81264e3e76d40a83b14 Mon Sep 17 00:00:00 2001 From: dojyorin Date: Mon, 17 Aug 2020 05:48:27 +0900 Subject: [PATCH] to constexpr. --- library.properties | 2 +- src/Base64.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library.properties b/library.properties index eaee619..9e84b21 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Base64_Codec -version=1.0.3 +version=1.0.4 author=dojyorin maintainer=https://github.com/dojyorin sentence=Base64 Codec diff --git a/src/Base64.cpp b/src/Base64.cpp index 13a3602..cd52f0d 100644 --- a/src/Base64.cpp +++ b/src/Base64.cpp @@ -1,14 +1,14 @@ #include "Base64.h" namespace{ - const char alphaTable[64] = { + constexpr char alphaTable[64] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, 0x2F }; - const uint8_t charTable[128] = { + constexpr uint8_t charTable[128] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3E, 0xFF, 0xFF, 0xFF, 0x3F,