summaryrefslogtreecommitdiff
path: root/src/utils/translation/poparser.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
commit3a407bb6b73a186eafd99bcec570f88097c4b2e1 (patch)
treeea57a752c348ba0a883294855ad3c62c16e9749d /src/utils/translation/poparser.cpp
parent872fc368f7b253f26714fc47323064f270b62b40 (diff)
downloadmv-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.gz
mv-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.bz2
mv-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.xz
mv-3a407bb6b73a186eafd99bcec570f88097c4b2e1.zip
Add const to more classes.
Diffstat (limited to 'src/utils/translation/poparser.cpp')
-rw-r--r--src/utils/translation/poparser.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/utils/translation/poparser.cpp b/src/utils/translation/poparser.cpp
index b2278c741..57d9b1604 100644
--- a/src/utils/translation/poparser.cpp
+++ b/src/utils/translation/poparser.cpp
@@ -40,7 +40,7 @@ PoParser::PoParser() :
void PoParser::openFile(std::string name)
{
- ResourceManager *resman = ResourceManager::getInstance();
+ const ResourceManager *const resman = ResourceManager::getInstance();
int size;
char *buf = static_cast<char*>(resman->loadFile(getFileName(name), size));
@@ -48,7 +48,8 @@ void PoParser::openFile(std::string name)
free(buf);
}
-PoDict *PoParser::load(std::string lang, std::string fileName, PoDict *dict)
+PoDict *PoParser::load(const std::string &lang, const std::string &fileName,
+ PoDict *const dict)
{
logger->log("loading lang: %s, file: %s", lang.c_str(), fileName.c_str());
@@ -214,7 +215,7 @@ PoDict *PoParser::getEmptyDict()
bool PoParser::checkLang(std::string lang) const
{
// check is po file exists
- ResourceManager *resman = ResourceManager::getInstance();
+ ResourceManager *const resman = ResourceManager::getInstance();
return resman->exists(getFileName(lang));
}
@@ -225,12 +226,12 @@ std::string PoParser::getFileName(std::string lang) const
return strprintf("translations/%s.po", lang.c_str());
}
-PoDict *PoParser::getDict()
+PoDict *PoParser::getDict() const
{
return new PoDict(mLang);
}
-void PoParser::convertStr(std::string &str)
+void PoParser::convertStr(std::string &str) const
{
if (str.empty())
return;