diff options
author | vng <viktor.govako@gmail.com> | 2015-08-18 17:30:38 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:01:34 +0300 |
commit | fb7e49b8285f92eb796a8a156461eeba5bbcbb83 (patch) | |
tree | 347be7653e973b1ef4833c91eb241bd93e1885bf /map/bookmark.cpp | |
parent | 6f4b88973b598abc92adf919587cdb6d7c41f929 (diff) |
Added buffer_vector::erase_if.
Diffstat (limited to 'map/bookmark.cpp')
-rw-r--r-- | map/bookmark.cpp | 8 |
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)); } |