Internals: Cleanup some inlines, use constexpr. No functional change intended.

This commit is contained in:
Wilson Snyder
2020-12-01 18:49:03 -05:00
parent 014e43f0ef
commit 212e8fb14b
18 changed files with 54 additions and 57 deletions
+3 -2
View File
@@ -307,7 +307,7 @@ uint64_t VHashSha256::digestUInt64() {
}
string VHashSha256::digestHex() {
static const char* digits = "0123456789abcdef";
static const char* const digits = "0123456789abcdef";
const string& binhash = digestBinary();
string out;
out.reserve(70);
@@ -323,7 +323,8 @@ string VHashSha256::digestSymbol() {
// has + and / for last two digits, but need C symbol, and we also
// avoid conflicts with use of _, so use "AB" at the end.
// Thus this function is non-reversible.
static const char* digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AB";
static const char* const digits
= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AB";
const string& binhash = digestBinary();
string out;
out.reserve(28);