diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 949b0691d..de87dd825 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -304,10 +304,18 @@ static bool hasbom(const std::string &str) } +// This wrapper exists because Sun's CC does not allow a static_cast +// from extern "C" int(*)(int) to int(*)(int). +static int tolowerWrapper(int c) +{ + return std::tolower(c); +} + + static bool isFallThroughComment(std::string comment) { // convert comment to lower case without whitespace - std::transform(comment.begin(), comment.end(), comment.begin(), ::tolower); + std::transform(comment.begin(), comment.end(), comment.begin(), tolowerWrapper); for (std::string::iterator i = comment.begin(); i != comment.end();) { if (::isspace(static_cast(*i))) @@ -1821,14 +1829,6 @@ Preprocessor::HeaderTypes Preprocessor::getHeaderFileName(std::string &str) } -// This wrapper exists because Sun's CC does not allow a static_cast -// from extern "C" int(*)(int) to int(*)(int). -static int tolowerWrapper(int c) -{ - return std::tolower(c); -} - - void Preprocessor::handleIncludes(std::string &code, const std::string &filePath, const std::list &includePaths) { std::list paths;