diff --git a/map/framework.cpp b/map/framework.cpp index 394073cb58..7c364c68e6 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -153,8 +153,8 @@ void Framework::GetLocalMaps(vector & outMaps) Platform & pl = GetPlatform(); pl.GetFilesInDir(pl.ResourcesDir(), "*" DATA_FILE_EXTENSION, outMaps); pl.GetFilesInDir(pl.WritableDir(), "*" DATA_FILE_EXTENSION, outMaps); - outMaps.resize(unique(outMaps.begin(), outMaps.end()) - outMaps.begin()); sort(outMaps.begin(), outMaps.end()); + outMaps.erase(unique(outMaps.begin(), outMaps.end()), outMaps.end()); } template diff --git a/platform/platform_qt.cpp b/platform/platform_qt.cpp index 59cf7d8b2b..e2de8d080d 100644 --- a/platform/platform_qt.cpp +++ b/platform/platform_qt.cpp @@ -52,8 +52,8 @@ void Platform::GetFontNames(FilesList & res) const { GetFilesInDir(ResourcesDir(), "*.ttf", res); GetFilesInDir(WritableDir(), "*.ttf", res); - res.resize(unique(res.begin(), res.end()) - res.begin()); sort(res.begin(), res.end()); + res.erase(unique(res.begin(), res.end()), res.end()); CHECK(!res.empty(), ("Can't find any valid font in", ResourcesDir(), WritableDir())); }