diff --git a/src/utils/md5.cpp b/src/utils/md5.cpp index 4f9dd938..f326c201 100644 --- a/src/utils/md5.cpp +++ b/src/utils/md5.cpp @@ -49,7 +49,7 @@ PUT_BIT_LE(0, cp, value); \ } while (0) -static uint8_t PADDING[MD5_BLOCK_LENGTH] = { +static constexpr uint8_t PADDING[MD5_BLOCK_LENGTH] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 diff --git a/src/utils/smallut.cpp b/src/utils/smallut.cpp index 6ffe9e46..9c7758e5 100644 --- a/src/utils/smallut.cpp +++ b/src/utils/smallut.cpp @@ -1213,7 +1213,7 @@ void catstrerror(string *reason, const char *what, int _errno) } -static std::unordered_map lang_to_code { +static const std::unordered_map lang_to_code { {"be", "cp1251"}, {"bg", "cp1251"}, {"cs", "iso-8859-2"}, diff --git a/src/utils/smallut.h b/src/utils/smallut.h index a2a0218b..d2f0f416 100644 --- a/src/utils/smallut.h +++ b/src/utils/smallut.h @@ -239,7 +239,7 @@ private: /// Entries for the descriptive table struct CharFlags { - CharFlags(int v, const char *y, const char *n=0) + CharFlags(int v, const char *y, const char *n=nullptr) : value(v), yesname(y), noname(n) {} unsigned int value; // Flag or value const char *yesname;// String to print if flag set or equal