Review notes
This commit is contained in:
parent
407531c1b7
commit
7b61ba4bb0
2 changed files with 6 additions and 6 deletions
|
@ -3,11 +3,9 @@
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
|
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include "3party/cttrie/cttrie.h"
|
#include "3party/cttrie/cttrie.h"
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#pragma clang diagnostic pop
|
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
|
|
|
@ -34,14 +34,16 @@ std::string DebugPrint(OsmElement::EntityType type)
|
||||||
|
|
||||||
// trim from start (in place)
|
// trim from start (in place)
|
||||||
static inline void ltrim(std::string &s) {
|
static inline void ltrim(std::string &s) {
|
||||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(),
|
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) {
|
||||||
std::not1(std::ptr_fun<int, int>(std::isspace))));
|
return !std::isspace(ch);
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// trim from end (in place)
|
// trim from end (in place)
|
||||||
static inline void rtrim(std::string &s) {
|
static inline void rtrim(std::string &s) {
|
||||||
s.erase(std::find_if(s.rbegin(), s.rend(),
|
s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) {
|
||||||
std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
|
return !std::isspace(ch);
|
||||||
|
}).base(), s.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
// trim from both ends (in place)
|
// trim from both ends (in place)
|
||||||
|
|
Loading…
Add table
Reference in a new issue