summaryrefslogtreecommitdiff
path: root/src/utils/translation/translationmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/utils/translation/translationmanager.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmanaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/utils/translation/translationmanager.cpp')
-rw-r--r--src/utils/translation/translationmanager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/translation/translationmanager.cpp b/src/utils/translation/translationmanager.cpp
index 67527b06a..aa0dd47da 100644
--- a/src/utils/translation/translationmanager.cpp
+++ b/src/utils/translation/translationmanager.cpp
@@ -90,7 +90,7 @@ PoDict *TranslationManager::loadLang(const LangVect &lang,
if (!name.empty())
return parser.load(name, subName + name, dict);
logger->log("can't find client data translation");
- if (dict)
+ if (dict != nullptr)
return dict;
return PoParser::getEmptyDict();
}
@@ -99,14 +99,14 @@ bool TranslationManager::translateFile(const std::string &fileName,
PoDict *const dict,
StringVect &lines)
{
- if (!dict || fileName.empty())
+ if ((dict == nullptr) || fileName.empty())
return false;
int contentsLength;
const char *fileContents = VirtFs::loadFile(fileName,
contentsLength);
- if (!fileContents)
+ if (fileContents == nullptr)
{
logger->log("Couldn't load file: %s", fileName.c_str());
return false;