diff options
Diffstat (limited to 'common/translation.cpp')
-rw-r--r-- | common/translation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/translation.cpp b/common/translation.cpp index 01665bf876..35e5b6e4c3 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -46,7 +46,7 @@ bool operator<(const TLanguage &l, const TLanguage &r) { return strcmp(l.name, r.name) < 0; } -TranslationManager::TranslationManager() : _currentLang(-1), _charmap(0) { +TranslationManager::TranslationManager() : _currentLang(-1), _charmap(nullptr) { loadTranslationsInfoDat(); // Set the default language @@ -110,7 +110,7 @@ void TranslationManager::setLanguage(const String &lang) { } const char *TranslationManager::getTranslation(const char *message) const { - return getTranslation(message, NULL); + return getTranslation(message, nullptr); } const char *TranslationManager::getTranslation(const char *message, const char *context) const { @@ -144,7 +144,7 @@ const char *TranslationManager::getTranslation(const char *message, const char * ++rightIndex; } // Find the context we want - if (context == NULL || *context == '\0' || leftIndex == rightIndex) + if (context == nullptr || *context == '\0' || leftIndex == rightIndex) return _currentTranslationMessages[leftIndex].msgstr.c_str(); // We could use again binary search, but there should be only a small number of contexts. while (rightIndex > leftIndex) { @@ -416,7 +416,7 @@ void TranslationManager::loadLanguageDat(int index) { // Setup the new charset mapping if (charmapNum == -1) { delete[] _charmap; - _charmap = 0; + _charmap = nullptr; } else { if (!_charmap) _charmap = new uint32[256]; |