[search] No-op: fix a typo.

This commit is contained in:
Yury Melnichek 2011-05-28 19:33:26 +02:00 committed by Alex Zolotarev
parent 830cda4750
commit c110c494d6
2 changed files with 10 additions and 10 deletions

View file

@ -60,11 +60,11 @@ void Query::Search(function<void (Result const &)> const & f)
min(scales::GetUpperScale(), scales::GetScaleLevel(m_rect) + 1));
vector<Result> results;
results.reserve(m_resuts.size());
while (!m_resuts.empty())
results.reserve(m_results.size());
while (!m_results.empty())
{
results.push_back(m_resuts.top().GenerateFinalResult());
m_resuts.pop();
results.push_back(m_results.top().GenerateFinalResult());
m_results.pop();
}
for (vector<Result>::const_reverse_iterator it = results.rbegin(); it != results.rend(); ++it)
f(*it);
@ -72,12 +72,12 @@ void Query::Search(function<void (Result const &)> const & f)
void Query::AddResult(IntermediateResult const & result)
{
if (m_resuts.size() < 10)
m_resuts.push(result);
else if (result < m_resuts.top())
if (m_results.size() < 10)
m_results.push(result);
else if (result < m_results.top())
{
m_resuts.pop();
m_resuts.push(result);
m_results.pop();
m_results.push(result);
}
}

View file

@ -37,7 +37,7 @@ public:
IndexType const * m_pIndex;
IndexType::Query m_indexQuery;
priority_queue<IntermediateResult> m_resuts;
priority_queue<IntermediateResult> m_results;
};
} // namespace search::impl