forked from organicmaps/organicmaps
Fixed TestSearchRequest behavior - results aren't accumulated, the
last list of results is stored.
This commit is contained in:
parent
4f9195930e
commit
a1db2850c9
1 changed files with 4 additions and 1 deletions
|
@ -39,10 +39,13 @@ vector<search::Result> const & TestSearchRequest::Results() const
|
|||
void TestSearchRequest::Done(search::Results const & results)
|
||||
{
|
||||
lock_guard<mutex> lock(m_mu);
|
||||
m_results.insert(m_results.end(), results.Begin(), results.End());
|
||||
if (results.IsEndMarker())
|
||||
{
|
||||
m_done = true;
|
||||
m_cv.notify_one();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_results.assign(results.Begin(), results.End());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue