Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2017-11-27 18:00:20 +0300
committerIlya Zverev <ilya@zverev.info>2017-11-27 18:03:53 +0300
commit077cafe7b11ff9c11467485282c2922fd35f7316 (patch)
treec40c939b606fe188aa934a765be4c94fad2b005e /indexer/editable_map_object.cpp
parent225b72e6392d267a5bdcdf9aa3b35a5fd100c8e5 (diff)
[editor] review fixes
Diffstat (limited to 'indexer/editable_map_object.cpp')
-rw-r--r--indexer/editable_map_object.cpp7
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)
{