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:
authorvng <viktor.govako@gmail.com>2015-08-18 17:30:38 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:01:34 +0300
commitfb7e49b8285f92eb796a8a156461eeba5bbcbb83 (patch)
tree347be7653e973b1ef4833c91eb241bd93e1885bf /map/bookmark.cpp
parent6f4b88973b598abc92adf919587cdb6d7c41f929 (diff)
Added buffer_vector::erase_if.
Diffstat (limited to 'map/bookmark.cpp')
-rw-r--r--map/bookmark.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/map/bookmark.cpp b/map/bookmark.cpp
index 99398a4487..f8c4769755 100644
--- a/map/bookmark.cpp
+++ b/map/bookmark.cpp
@@ -825,13 +825,7 @@ string BookmarkCategory::RemoveInvalidSymbols(string const & name)
{
// Remove not allowed symbols
strings::UniString uniName = strings::MakeUniString(name);
- strings::UniString::iterator iEnd = remove_if(uniName.begin(), uniName.end(), &IsBadCharForPath);
- if (iEnd != uniName.end())
- {
- // buffer_vector doesn't have erase function - call resize here (it's even better in this case).
- uniName.resize(distance(uniName.begin(), iEnd));
- }
-
+ uniName.erase_if(&IsBadCharForPath);
return (uniName.empty() ? "Bookmarks" : strings::ToUtf8(uniName));
}