From f6b31e528487b04c4cdf3b7704b7b497f29d3824 Mon Sep 17 00:00:00 2001 From: Leszek Swirski Date: Thu, 14 Nov 2013 01:13:47 +0000 Subject: [PATCH] Use locale overload of std::isupper --- cpp/ycm/Result.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpp/ycm/Result.cpp b/cpp/ycm/Result.cpp index 26b18812..fb4789b8 100644 --- a/cpp/ycm/Result.cpp +++ b/cpp/ycm/Result.cpp @@ -21,6 +21,7 @@ #include #include #include +#include using boost::algorithm::istarts_with; @@ -29,9 +30,9 @@ namespace YouCompleteMe { namespace { char ChangeCharCase( char c ) { - if ( std::isupper( c ) ) - return std::tolower( c ); - return std::toupper( c ); + if ( std::isupper( c, std::locale() ) ) + return std::tolower( c, std::locale() ); + return std::toupper( c, std::locale() ); }