From 8bf668665b107469086f16cb8ad23e47d479d2b4 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:14:37 +0200 Subject: 4.0 --- shared/string_tools.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'shared/string_tools.h') diff --git a/shared/string_tools.h b/shared/string_tools.h index d2e2c597..8951d942 100644 --- a/shared/string_tools.h +++ b/shared/string_tools.h @@ -311,8 +311,7 @@ bool endsWith(const S& str, const T& postfix) } -// get all characters after the last occurence of ch -// (returns the whole string if ch not found) +//returns the whole string if ch not found template inline S afterLast(const S& str, const T& ch) { @@ -329,8 +328,7 @@ S afterLast(const S& str, const T& ch) } -// get all characters before the last occurence of ch -// (returns empty string if ch not found) +//returns empty string if ch not found template inline S beforeLast(const S& str, const T& ch) { @@ -515,7 +513,7 @@ private: { wchar_t buffer[50]; #ifdef __MINGW32__ - int charsWritten = ::swprintf(buffer, L"%f", static_cast(number)); //MinGW does not comply to the C standard! + int charsWritten = ::swprintf(buffer, L"%f", static_cast(number)); //MinGW does not comply to the C standard here #else int charsWritten = std::swprintf(buffer, 50, L"%f", static_cast(number)); #endif @@ -662,12 +660,12 @@ inline S toString(const Num& number) //convert number to string the C++ way { using namespace implementation; - return CvrtNumberToString::isSignedInt ? NUM_TYPE_SIGNED_INT : Loki::TypeTraits::isUnsignedInt ? NUM_TYPE_UNSIGNED_INT : Loki::TypeTraits::isFloat ? NUM_TYPE_FLOATING_POINT : NUM_TYPE_OTHER - >().convert(number); + > ().convert(number); } @@ -676,12 +674,12 @@ inline Num toNumber(const S& str) //convert string to number the C++ way { using namespace implementation; - return CvrtStringToNumber::isSignedInt ? NUM_TYPE_SIGNED_INT : Loki::TypeTraits::isUnsignedInt ? NUM_TYPE_UNSIGNED_INT : Loki::TypeTraits::isFloat ? NUM_TYPE_FLOATING_POINT : NUM_TYPE_OTHER - >().convert(str); + > ().convert(str); } } -- cgit