aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-12-13 10:05:32 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-13 09:58:20 +0100
commitfa5865a9e339e7fe4068fbcce2ac055ed49eddfd (patch)
treed925edd61fcbd92bf5bf0596854eab8c7ffbd9ef /src/util
parentfad6761cf7875c7e91fd76398a71a9f9c6b3ea82 (diff)
downloadbitcoin-fa5865a9e339e7fe4068fbcce2ac055ed49eddfd.tar.xz
Reduce size of strencodings decode tables
Diffstat (limited to 'src/util')
-rw-r--r--src/util/strencodings.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/util/strencodings.cpp b/src/util/strencodings.cpp
index 8627d17023..f4768d5bb6 100644
--- a/src/util/strencodings.cpp
+++ b/src/util/strencodings.cpp
@@ -141,8 +141,7 @@ std::string EncodeBase64(Span<const unsigned char> input)
std::vector<unsigned char> DecodeBase64(const char* p, bool* pf_invalid)
{
- static const int decode64_table[256] =
- {
+ static const int8_t decode64_table[256]{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1,
@@ -220,8 +219,7 @@ std::string EncodeBase32(const std::string& str, bool pad)
std::vector<unsigned char> DecodeBase32(const char* p, bool* pf_invalid)
{
- static const int decode32_table[256] =
- {
+ static const int8_t decode32_table[256]{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1,