diff options
author | Sergey Magidovich <mgsergio@mapswithme.com> | 2016-08-03 22:42:28 +0300 |
---|---|---|
committer | Sergey Magidovich <mgsergio@mapswithme.com> | 2016-08-05 14:57:32 +0300 |
commit | 51f01fb05559f89de38686dacc318f9d94b89e86 (patch) | |
tree | d3c3b5b4cd3862c2398d179fae1001ac5a6236d6 /indexer/classificator_loader.cpp | |
parent | 67c3ee92cbef04205a05f61010427234e77592be (diff) |
Code review.
Diffstat (limited to 'indexer/classificator_loader.cpp')
-rw-r--r-- | indexer/classificator_loader.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/indexer/classificator_loader.cpp b/indexer/classificator_loader.cpp index 29dcd831fa..d996235d07 100644 --- a/indexer/classificator_loader.cpp +++ b/indexer/classificator_loader.cpp @@ -40,30 +40,30 @@ void ReadCommon(unique_ptr<Reader> classificator, namespace classificator { - void Load() - { - LOG(LDEBUG, ("Reading of classificator started")); +void Load() +{ + LOG(LDEBUG, ("Reading of classificator started")); - Platform & p = GetPlatform(); + Platform & p = GetPlatform(); - MapStyle const originMapStyle = GetStyleReader().GetCurrentStyle(); + MapStyle const originMapStyle = GetStyleReader().GetCurrentStyle(); - for (size_t i = 0; i < MapStyleCount; ++i) + for (size_t i = 0; i < MapStyleCount; ++i) + { + MapStyle const mapStyle = static_cast<MapStyle>(i); + // Read the merged style only if it was requested. + if (mapStyle != MapStyleMerged || originMapStyle == MapStyleMerged) { - MapStyle const mapStyle = static_cast<MapStyle>(i); - // Read the merged style only if it was requested. - if (mapStyle != MapStyleMerged || originMapStyle == MapStyleMerged) - { - GetStyleReader().SetCurrentStyle(mapStyle); - ReadCommon(p.GetReader("classificator.txt"), - p.GetReader("types.txt")); - - drule::LoadRules(); - } + GetStyleReader().SetCurrentStyle(mapStyle); + ReadCommon(p.GetReader("classificator.txt"), + p.GetReader("types.txt")); + + drule::LoadRules(); } + } - GetStyleReader().SetCurrentStyle(originMapStyle); + GetStyleReader().SetCurrentStyle(originMapStyle); - LOG(LDEBUG, ("Reading of classificator finished")); - } + LOG(LDEBUG, ("Reading of classificator finished")); +} } // namespace classificator |