diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-29 03:51:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-29 03:52:16 +0300 |
commit | 3bf4e26b1319295532bb4396cbd6406d85cbcae0 (patch) | |
tree | 80a4303b29aafa21683e90e45798283a482bf1d1 /src/utils/stringutils.cpp | |
parent | 7f607a0f58a9eba53237955c06bf445c71d57b6c (diff) | |
download | manaplus-3bf4e26b1319295532bb4396cbd6406d85cbcae0.tar.gz manaplus-3bf4e26b1319295532bb4396cbd6406d85cbcae0.tar.bz2 manaplus-3bf4e26b1319295532bb4396cbd6406d85cbcae0.tar.xz manaplus-3bf4e26b1319295532bb4396cbd6406d85cbcae0.zip |
Replace vectors with strings to short names.
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r-- | src/utils/stringutils.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 5a7ea87fd..b1e464005 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -203,12 +203,11 @@ unsigned long findI(std::string str, std::string subStr) return str.find(subStr); } -unsigned long findI(std::string text, std::vector<std::string> &list) +unsigned long findI(std::string text, StringVect &list) { std::string str = toLower(text); unsigned long idx; - for (std::vector<std::string>::const_iterator i = list.begin(); - i != list.end(); ++i) + for (StringVectCIter i = list.begin(); i != list.end(); ++ i) { std::string subStr = *i; subStr = toLower(subStr); @@ -447,8 +446,8 @@ std::list<std::string> splitToStringList(const std::string &text, return tokens; } -void splitToStringVector(std::vector<std::string> &tokens, - const std::string &text, char separator) +void splitToStringVector(StringVect &tokens, const std::string &text, + char separator) { std::stringstream ss(text); std::string item; |