summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-03-02 20:43:10 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-03-18 19:58:55 +0100
commitbce577e663e28e1942fda371235eba091a6ea8e2 (patch)
treea54ce0b47eae92b760ddd763036ff3609d1415ef /src/utils/stringutils.h
parent20afba1adc84dd0e859605250c5a44a111045c2b (diff)
downloadmana-client-bce577e663e28e1942fda371235eba091a6ea8e2.tar.gz
mana-client-bce577e663e28e1942fda371235eba091a6ea8e2.tar.bz2
mana-client-bce577e663e28e1942fda371235eba091a6ea8e2.tar.xz
mana-client-bce577e663e28e1942fda371235eba091a6ea8e2.zip
Removed some 'const' keywords from value returns
It makes no sense to mark a return value as const when it is returned by value. This only makes sense if the return value is passed by reference, in order to prevent the receiver from modifying the value. Also made some other small adjustments. A std::string does not need to be initialized to "" explicitly and getSafeUtf8String could take its parameter by reference. Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/utils/stringutils.h')
-rw-r--r--src/utils/stringutils.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index 74365491..b83bc580 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -125,10 +125,10 @@ int compareStrI(const std::string &a, const std::string &b);
*/
bool isWordSeparator(char chr);
-const std::string findSameSubstring(const std::string &str1,
- const std::string &str2);
+std::string findSameSubstring(const std::string &str1,
+ const std::string &str2);
-const char* getSafeUtf8String(std::string text);
+const char *getSafeUtf8String(const std::string &text);
/**
* Returns a bool value depending on the given string value.