summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-07 14:57:08 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-07 21:38:21 +0300
commitae550d179c25e149f7e8a8d70011b364fb0d85d6 (patch)
treec4dabe3e38afc8b343e3946202eb6fa5f30a18a9 /src/utils
parent2566e68d2502d39c9f7c9d83ce4b281e2834fe29 (diff)
downloadmanaverse-ae550d179c25e149f7e8a8d70011b364fb0d85d6.tar.gz
manaverse-ae550d179c25e149f7e8a8d70011b364fb0d85d6.tar.bz2
manaverse-ae550d179c25e149f7e8a8d70011b364fb0d85d6.tar.xz
manaverse-ae550d179c25e149f7e8a8d70011b364fb0d85d6.zip
some fixes after auto check.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/mkdir.cpp4
-rw-r--r--src/utils/translation/translationmanager.cpp6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp
index bc089d3d8..4d7312285 100644
--- a/src/utils/mkdir.cpp
+++ b/src/utils/mkdir.cpp
@@ -113,7 +113,7 @@ int mkdir_r(const char *const pathname)
/// Create a directory, making leading components first if necessary
int mkdir_r(const char *const pathname)
{
- const size_t len = static_cast<int>(strlen(pathname));
+ const size_t len = static_cast<size_t>(strlen(pathname));
char *tmp = new char[len + 2];
char *p;
@@ -132,7 +132,7 @@ int mkdir_r(const char *const pathname)
{
*p = '\0';
// ignore a slash at the beginning of a path
- if (strlen(tmp) == 0)
+ if (tmp[0] == 0)
{
*p = '/';
continue;
diff --git a/src/utils/translation/translationmanager.cpp b/src/utils/translation/translationmanager.cpp
index e15ff0c0a..0a9a40c09 100644
--- a/src/utils/translation/translationmanager.cpp
+++ b/src/utils/translation/translationmanager.cpp
@@ -37,15 +37,13 @@
void TranslationManager::init()
{
- if (translator)
- delete translator;
+ delete translator;
translator = PoParser::getEmptyDict();
}
void TranslationManager::loadCurrentLang()
{
- if (translator)
- delete translator;
+ delete translator;
translator = loadLang(getLang(), "");
translator = loadLang(getLang(), "help/", translator);
}