From 8342f06f7cb59c2436e0e052cdada3d4051cb266 Mon Sep 17 00:00:00 2001 From: Johannes Schanda Date: Wed, 16 Oct 2013 13:34:45 +0200 Subject: Remove lambda expressions as unsuppoerted by GCC 4.4 --- src/CommonAPI/utils.h | 16 ++++++++++------ 1 file 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(); } -- cgit v1.2.1