[search] If there are no slots for results remaining, finish early.

This commit is contained in:
Yury Melnichek 2011-06-18 18:20:55 +02:00 committed by Alex Zolotarev
parent 86b5bfa93b
commit 1b39a479e9

View file

@ -176,6 +176,11 @@ void Query::Search(function<void (Result const &)> const & f)
return;
FlushResults(f);
if (m_resultsRemaining == 0 || m_queryText.empty())
{
f(Result(string(), string())); // Send last search result marker.
return;
}
// Feature matching.
FeatureProcessor featureProcessor(*this);