forked from organicmaps/organicmaps-tmp
Minor optimization in ForEachInIntervalAndScale().
This commit is contained in:
parent
6368e0e6dc
commit
96ada73020
2 changed files with 5 additions and 2 deletions
|
@ -11,7 +11,6 @@
|
|||
#include "../base/stl_add.hpp"
|
||||
|
||||
#include "../std/algorithm.hpp"
|
||||
#include "../std/bind.hpp"
|
||||
|
||||
|
||||
class ScaleIndexBase
|
||||
|
@ -94,8 +93,11 @@ public:
|
|||
{
|
||||
size_t const scaleBucket = BucketByScale(scale);
|
||||
if (scaleBucket < m_IndexForScale.size())
|
||||
{
|
||||
IntervalIndexIFace::FunctionT f1(f);
|
||||
for (size_t i = 0; i <= scaleBucket; ++i)
|
||||
m_IndexForScale[i]->DoForEach(bind<void>(ref(f), _1), beg, end);
|
||||
m_IndexForScale[i]->DoForEach(f1, beg, end);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "../base/logging.hpp"
|
||||
|
||||
#include "../std/bind.hpp"
|
||||
#include "../std/function.hpp"
|
||||
#include "../std/string.hpp"
|
||||
#include "../std/vector.hpp"
|
||||
|
|
Loading…
Add table
Reference in a new issue