diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2015-07-27 16:53:39 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:57:49 +0300 |
commit | 1ba4b9e9196ef22dc28edc1e9dddcf3bdbbf7ce5 (patch) | |
tree | 61ae20804acd005ce52df0de8f2f85848ffc3ca7 /generator | |
parent | 45610d1dcf47239551d4d3051719c9abb12ef10d (diff) |
Review fix
Diffstat (limited to 'generator')
-rw-r--r-- | generator/coastlines_generator.cpp | 14 | ||||
-rw-r--r-- | generator/coastlines_generator.hpp | 2 | ||||
-rw-r--r-- | generator/osm_source.cpp | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/generator/coastlines_generator.cpp b/generator/coastlines_generator.cpp index 8f20bc1608..1c5ba890a8 100644 --- a/generator/coastlines_generator.cpp +++ b/generator/coastlines_generator.cpp @@ -214,11 +214,11 @@ namespace class RegionInCellSplitter final { public: - typedef RectId TCell; - typedef m4::Tree<m2::RegionI> TIndex; - typedef function<void(TCell const &, DoDifference &)> TProcessResultFunc; + using TCell = RectId; + using TIndex = m4::Tree<m2::RegionI>; + using TProcessResultFunc = function<void(TCell const &, DoDifference &)>; - enum {kHighLevel = 10, kMaxPoints = 20000}; + enum {kStartLevel = 4, kHighLevel = 10, kMaxPoints = 20000}; protected: TIndex const & m_index; @@ -259,7 +259,7 @@ public: for (size_t i = 0; i < numThreads; ++i) { instances.emplace_back(RegionInCellSplitter(listTasks, mutexTasks, condVar, inWork, funcResult, mutexResult, index)); - threads.emplace_back(thread(instances.back())); + threads.emplace_back(instances.back()); } for (auto & thread : threads) @@ -330,10 +330,10 @@ public: }; -void CoastlineFeaturesGenerator::GetFeatures(size_t baseLevel, vector<FeatureBuilder1> & features) +void CoastlineFeaturesGenerator::GetFeatures(vector<FeatureBuilder1> & features) { size_t maxThreads = thread::thread::hardware_concurrency(); - RegionInCellSplitter::Process(maxThreads, baseLevel, m_tree, + RegionInCellSplitter::Process(maxThreads, RegionInCellSplitter::kStartLevel, m_tree, [&features, this](RegionInCellSplitter::TCell const & cell, DoDifference & cellData) { features.emplace_back(FeatureBuilder1()); diff --git a/generator/coastlines_generator.hpp b/generator/coastlines_generator.hpp index cda303f415..2789b4d9fb 100644 --- a/generator/coastlines_generator.hpp +++ b/generator/coastlines_generator.hpp @@ -28,5 +28,5 @@ public: /// @return false if coasts are not merged and FLAG_fail_on_coasts is set bool Finish(); - void GetFeatures(size_t baseLevel, vector<FeatureBuilder1> & vecFb); + void GetFeatures(vector<FeatureBuilder1> & vecFb); }; diff --git a/generator/osm_source.cpp b/generator/osm_source.cpp index 3ffdbbfb4d..50304a9a0d 100644 --- a/generator/osm_source.cpp +++ b/generator/osm_source.cpp @@ -309,7 +309,7 @@ namespace size_t totalPolygons = 0; vector<FeatureBuilder1> vecFb; - m_coasts->GetFeatures(4 /*start level*/, vecFb); + m_coasts->GetFeatures(vecFb); for (size_t j = 0; j < vecFb.size(); ++j) { |