diff options
author | Johannes Schanda <schanda@itestra.de> | 2013-10-16 13:34:45 +0200 |
---|---|---|
committer | Johannes Schanda <schanda@itestra.de> | 2013-10-16 13:34:45 +0200 |
commit | 8342f06f7cb59c2436e0e052cdada3d4051cb266 (patch) | |
tree | 1db48ded8b0571384d4c04c5325f8f859605ce40 /src/CommonAPI | |
parent | 4a67dee2091775d681801cdc8a2a3274000ec143 (diff) | |
download | genivi-common-api-runtime-8342f06f7cb59c2436e0e052cdada3d4051cb266.tar.gz |
Remove lambda expressions as unsuppoerted by GCC 4.4
Diffstat (limited to 'src/CommonAPI')
-rw-r--r-- | src/CommonAPI/utils.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/CommonAPI/utils.h b/src/CommonAPI/utils.h index 7717103..2dccfcc 100644 --- a/src/CommonAPI/utils.h +++ b/src/CommonAPI/utils.h @@ -109,6 +109,10 @@ inline void trim(std::string& toTrim) { ); } +inline bool notIsdigit(char c) { + return !std::isdigit(c); +} + /** * \brief Checks whether the given string contains nothing but digits. * @@ -120,13 +124,15 @@ inline bool containsOnlyDigits(const std::string& toCheck) { auto firstNonDigitIt = std::find_if( toCheck.begin(), toCheck.end(), - [](char c) { - return !std::isdigit(c); - }); + notIsdigit); return firstNonDigitIt == toCheck.end(); } +inline bool notIsalnum(char c) { + return !std::isalnum(c); +} + /** * \brief Checks whether the given string contains nothing but alphanumeric characters. * @@ -138,9 +144,7 @@ inline bool containsOnlyAlphanumericCharacters(const std::string& toCheck) { auto firstNonAlphanumericCharacterIt = std::find_if( toCheck.begin(), toCheck.end(), - [](char c) { - return !std::isalnum(c); - }); + notIsalnum); return firstNonAlphanumericCharacterIt == toCheck.end(); } |