diff --git a/search/v2/features_layer_matcher.hpp b/search/v2/features_layer_matcher.hpp index eba7a8c4f8..440defccbd 100644 --- a/search/v2/features_layer_matcher.hpp +++ b/search/v2/features_layer_matcher.hpp @@ -100,9 +100,9 @@ private: vector poiCenters(child.m_sortedFeatures->size()); - // Initially all features are not processed. - vector isPOIProcessed(child.m_sortedFeatures->size()); - size_t notProcessedPOIs = isPOIProcessed.size(); + size_t const numPOIs = child.m_sortedFeatures->size(); + vector isPOIProcessed(numPOIs); + size_t processedPOIs = 0; for (size_t i = 0; i < child.m_sortedFeatures->size(); ++i) { @@ -111,7 +111,7 @@ private: poiCenters[i] = feature::GetCenter(poiFt, FeatureType::WORST_GEOMETRY); } - for (size_t i = 0; i < parent.m_sortedFeatures->size() && notProcessedPOIs != 0; ++i) + for (size_t i = 0; i < parent.m_sortedFeatures->size() && processedPOIs != numPOIs; ++i) { BailIfCancelled(m_cancellable); @@ -128,7 +128,7 @@ private: { fn((*child.m_sortedFeatures)[j], (*parent.m_sortedFeatures)[i]); isPOIProcessed[j] = true; - --notProcessedPOIs; + ++processedPOIs; } } } diff --git a/search/v2/features_layer_path_finder.hpp b/search/v2/features_layer_path_finder.hpp index 5ffabbf0be..1670e71b16 100644 --- a/search/v2/features_layer_path_finder.hpp +++ b/search/v2/features_layer_path_finder.hpp @@ -46,7 +46,7 @@ public: // TODO (@y): remove following code as soon as // FindReachableVertices() will work fast for most cases - // (significanly less than 1 second). + // (significantly less than 1 second). #if defined(DEBUG) fprintf(stderr, "FeaturesLayerPathFinder()\n"); for (auto const * layer : layers) diff --git a/search/v2/geocoder.cpp b/search/v2/geocoder.cpp index c0c683e28c..41faedd31e 100644 --- a/search/v2/geocoder.cpp +++ b/search/v2/geocoder.cpp @@ -112,7 +112,7 @@ void Geocoder::SetParams(Params const & params) void Geocoder::Go(vector & results) { // TODO (@y): remove following code as soon as Geocoder::Go() will - // work fast for most cases (significanly less than 1 second). + // work fast for most cases (significantly less than 1 second). #if defined(DEBUG) my::Timer timer; MY_SCOPE_GUARD(printDuration, [&timer]()