diff --git a/3party/cttrie/cttrie.hpp b/3party/cttrie/cttrie.hpp index f13262b..f63fbe4 100644 --- a/3party/cttrie/cttrie.hpp +++ b/3party/cttrie/cttrie.hpp @@ -3,11 +3,9 @@ #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wshorten-64-to-32" -#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-parameter" #include "3party/cttrie/cttrie.h" #pragma clang diagnostic pop -#pragma clang diagnostic pop #elif defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/generator/osm_element.cpp b/generator/osm_element.cpp index 561cdd3..acd140f 100644 --- a/generator/osm_element.cpp +++ b/generator/osm_element.cpp @@ -34,14 +34,16 @@ std::string DebugPrint(OsmElement::EntityType type) // trim from start (in place) static inline void ltrim(std::string &s) { - s.erase(s.begin(), std::find_if(s.begin(), s.end(), - std::not1(std::ptr_fun(std::isspace)))); + s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { + return !std::isspace(ch); + })); } // trim from end (in place) static inline void rtrim(std::string &s) { - s.erase(std::find_if(s.rbegin(), s.rend(), - std::not1(std::ptr_fun(std::isspace))).base(), s.end()); + s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { + return !std::isspace(ch); + }).base(), s.end()); } // trim from both ends (in place)