diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-11-27 18:00:20 +0300 |
---|---|---|
committer | Ilya Zverev <ilya@zverev.info> | 2017-11-27 18:03:53 +0300 |
commit | 077cafe7b11ff9c11467485282c2922fd35f7316 (patch) | |
tree | c40c939b606fe188aa934a765be4c94fad2b005e /indexer/editable_map_object.cpp | |
parent | 225b72e6392d267a5bdcdf9aa3b35a5fd100c8e5 (diff) |
[editor] review fixes
Diffstat (limited to 'indexer/editable_map_object.cpp')
-rw-r--r-- | indexer/editable_map_object.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indexer/editable_map_object.cpp b/indexer/editable_map_object.cpp index 02067c4e32..3c1b3d123a 100644 --- a/indexer/editable_map_object.cpp +++ b/indexer/editable_map_object.cpp @@ -7,6 +7,7 @@ #include "base/macros.hpp" #include "base/string_utils.hpp" +#include <algorithm> #include <codecvt> #include <cctype> #include <cmath> @@ -618,7 +619,7 @@ bool EditableMapObject::ValidateFlats(string const & flats) for (auto const & rangeBorder : range) { - if (!all_of(begin(rangeBorder), end(rangeBorder), isalnum)) + if (!all_of(begin(rangeBorder), end(rangeBorder), ::isalnum)) return false; } } @@ -767,13 +768,13 @@ bool EditableMapObject::ValidateName(string const & name) return true; if (strings::IsASCIIString(name)) - return regex_match(name, regex(R"(^[ A-Za-z0-9.,?!@()\-:;"'`]+$)")); + return regex_match(name, regex(R"(^[ A-Za-z0-9.,?!@$%()\-:;"'`]+$)")); std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> converter; std::u32string const u32name = converter.from_bytes(name); - std::u32string const excludedSymbols = U"$%^~§><{}[]*=_#№±\n\t\r\v\f|√•π÷׶∆°"; + std::u32string const excludedSymbols = U"^~§><{}[]*=_#№±\n\t\r\v\f|√•π÷׶∆°"; for (auto const ch : u32name) { |