diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2019-02-14 11:10:47 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2019-02-14 17:39:50 +0300 |
commit | 5b1935b568929c2d1f471922ed504a69641f6f39 (patch) | |
tree | 3b5204a637cdb2382eb1e3a25269e4148d30d56f /generator | |
parent | 61c9cd7275fe4feb4a47cb25abac965606805f0d (diff) |
Review fixes.
Diffstat (limited to 'generator')
-rw-r--r-- | generator/camera_info_collector.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/generator/camera_info_collector.cpp b/generator/camera_info_collector.cpp index 665d900fdd..9793c2761c 100644 --- a/generator/camera_info_collector.cpp +++ b/generator/camera_info_collector.cpp @@ -16,6 +16,7 @@ #include "base/string_utils.hpp" #include <algorithm> +#include <array> #include <limits> namespace generator @@ -318,30 +319,19 @@ void CamerasInfoCollector::Camera::Serialize(FileWriter & writer, bool IsCamerasInfoProhibited(std::string const & mwmName) { - std::vector<std::string> const kMwmBlockList = { + std::array<std::string, 4> kCountryBlockList = { "Cyprus", "Macedonia", - "Switzerland_Central", - "Switzerland_Eastern", - "Switzerland_Espace Mittelland_Bern", - "Switzerland_Espace Mittelland_East", - "Switzerland_Lake Geneva region", - "Switzerland_Northwestern", - "Switzerland_Ticino", - "Switzerland_Zurich", - "Turkey_Aegean Region", - "Turkey_Black Sea Region", - "Turkey_Central Anatolia Region_Ankara", - "Turkey_Central Anatolia Region_Kayseri", - "Turkey_Eastern Anatolia Region", - "Turkey_Marmara Region_Bursa", - "Turkey_Marmara Region_Istanbul", - "Turkey_Mediterranean Region", - "Turkey_Southeastern Anatolia Region", + "Switzerland", + "Turkey", }; - CHECK(is_sorted(kMwmBlockList.cbegin(), kMwmBlockList.cend()), ()); - return std::binary_search(kMwmBlockList.cbegin(), kMwmBlockList.cend(), mwmName); + for (auto const & country : kCountryBlockList) + { + if (strings::StartsWith(mwmName, country)) + return true; + } + return false; } void BuildCamerasInfo(std::string const & dataFilePath, |