small cleanups in shared code

This commit is contained in:
Jean-Francois Dockes 2020-10-25 14:03:19 +01:00
parent e10cb959b3
commit c90f418db6
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -1213,7 +1213,7 @@ void catstrerror(string *reason, const char *what, int _errno)
}
static std::unordered_map<string, string> lang_to_code {
static const std::unordered_map<string, string> lang_to_code {
{"be", "cp1251"},
{"bg", "cp1251"},
{"cs", "iso-8859-2"},

View File

@ -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