diff --git a/generator/filter_world.cpp b/generator/filter_world.cpp index 5991094329..874c7b3557 100644 --- a/generator/filter_world.cpp +++ b/generator/filter_world.cpp @@ -59,7 +59,7 @@ bool FilterWorld::IsPopularAttraction(feature::FeatureBuilder const & fb, std::s return false; } - auto static const & m_popularPlaces = GetOrLoadPopularPlacesLoader(popularityFilename); + auto static const & m_popularPlaces = GetOrLoadPopularPlaces(popularityFilename); auto const it = m_popularPlaces.find(fb.GetMostGenericOsmId()); if (it == m_popularPlaces.end()) return false; diff --git a/generator/popular_places_section_builder.cpp b/generator/popular_places_section_builder.cpp index 73e2919b3c..925ce10093 100644 --- a/generator/popular_places_section_builder.cpp +++ b/generator/popular_places_section_builder.cpp @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -111,19 +112,19 @@ bool BuildPopularPlacesMwmSection(std::string const & srcFilename, std::string c } -PopularPlaces const & GetOrLoadPopularPlacesLoader(std::string const & filename) +PopularPlaces const & GetOrLoadPopularPlaces(std::string const & filename) { static std::mutex m; - static std::unordered_map plases; + static std::unordered_map plaсes; std::lock_guard lock(m); - auto const it = plases.find(filename); - if (it != plases.cend()) + auto const it = plaсes.find(filename); + if (it != plaсes.cend()) return it->second; PopularPlaces places; LoadPopularPlaces(filename, places); - auto const eIt = plases.emplace(filename, places); + auto const eIt = plaсes.emplace(filename, places); return eIt.first->second; } } // namespace generator diff --git a/generator/popular_places_section_builder.hpp b/generator/popular_places_section_builder.hpp index ba9395c914..c30703c6ad 100644 --- a/generator/popular_places_section_builder.hpp +++ b/generator/popular_places_section_builder.hpp @@ -3,7 +3,6 @@ #include "base/geo_object_id.hpp" #include -#include #include namespace generator @@ -16,5 +15,5 @@ void LoadPopularPlaces(std::string const & srcFilename, PopularPlaces & places); bool BuildPopularPlacesMwmSection(std::string const & srcFilename, std::string const & mwmFile, std::string const & osmToFeatureFilename); -PopularPlaces const & GetOrLoadPopularPlacesLoader(std::string const & filename); +PopularPlaces const & GetOrLoadPopularPlaces(std::string const & filename); } // namespace generator