summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-01 23:56:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-02 14:28:17 +0300
commit520a495c466793c29f3e721634dfe6cc616b8ede (patch)
tree749b67f5d4df83f6f4997dabeb66ec394eabccd7 /src/utils
parentf9030497b6196ce2fadb6b6ada5d784be227d9a6 (diff)
downloadplus-520a495c466793c29f3e721634dfe6cc616b8ede.tar.gz
plus-520a495c466793c29f3e721634dfe6cc616b8ede.tar.bz2
plus-520a495c466793c29f3e721634dfe6cc616b8ede.tar.xz
plus-520a495c466793c29f3e721634dfe6cc616b8ede.zip
Add missing const.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/langs.cpp6
-rw-r--r--src/utils/stringutils.cpp2
-rw-r--r--src/utils/stringutils.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/utils/langs.cpp b/src/utils/langs.cpp
index af05649a9..6a2215d30 100644
--- a/src/utils/langs.cpp
+++ b/src/utils/langs.cpp
@@ -35,7 +35,7 @@ static const char *getLangName()
LangVect getLang()
{
LangVect langs;
- std::string lang = config.getStringValue("lang").c_str();
+ std::string lang = config.getStringValue("lang");
if (lang.empty())
{
const char *const lng = getLangName();
@@ -60,7 +60,7 @@ LangVect getLang()
std::string getLangSimple()
{
- const std::string lang = config.getStringValue("lang").c_str();
+ const std::string lang = config.getStringValue("lang");
if (lang.empty())
{
const char *const lng = getLangName();
@@ -77,7 +77,7 @@ std::string getLangSimple()
std::string getLangShort()
{
- std::string lang = config.getStringValue("lang").c_str();
+ std::string lang = config.getStringValue("lang");
if (lang.empty())
{
const char *const lng = getLangName();
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index e7b850510..cacb3befd 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -189,7 +189,7 @@ size_t findI(std::string str, std::string subStr)
return str.find(subStr);
}
-size_t findI(std::string text, StringVect &list)
+size_t findI(std::string text, const StringVect &list)
{
toLower(text);
FOR_EACH (StringVectCIter, i, list)
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index cd04006ef..4f84dab76 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -138,7 +138,7 @@ bool isWordSeparator(const signed char chr) A_WARN_UNUSED;
size_t findI(std::string str, std::string subStr) A_WARN_UNUSED;
-size_t findI(std::string text, StringVect &list) A_WARN_UNUSED;
+size_t findI(std::string text, const StringVect &list) A_WARN_UNUSED;
const std::string encodeStr(unsigned int value,
const unsigned int size = 0) A_WARN_UNUSED;