Review fixes.

This commit is contained in:
Yuri Gorshenin 2017-10-26 15:12:55 +03:00 committed by r.kuznetsov
parent 7d9d8610d8
commit c367ee3c36
3 changed files with 7 additions and 7 deletions

View file

@ -837,7 +837,7 @@ void Storage::RegisterDownloadedFiles(TCountryId const & countryId, MapOptions o
CHECK(!m_queue.empty(), ());
PushToJustDownloaded(m_queue.begin());
PeekFromQueue(m_queue.begin());
PopFromQueue(m_queue.begin());
SaveDownloadQueue();
m_downloader->Reset();
@ -1170,7 +1170,7 @@ bool Storage::DeleteCountryFilesFromDownloader(TCountryId const & countryId)
{
auto it = find(m_queue.begin(), m_queue.end(), countryId);
ASSERT(it != m_queue.end(), ());
PeekFromQueue(it);
PopFromQueue(it);
SaveDownloadQueue();
}
@ -1770,7 +1770,7 @@ void Storage::PushToJustDownloaded(TQueue::iterator justDownloadedItem)
m_justDownloaded.insert(justDownloadedItem->GetCountryId());
}
void Storage::PeekFromQueue(TQueue::iterator it)
void Storage::PopFromQueue(TQueue::iterator it)
{
CHECK(!m_queue.empty(), ());
m_queue.erase(it);
@ -1895,7 +1895,7 @@ void Storage::OnDownloadFailed(TCountryId const & countryId)
m_failedCountries.insert(countryId);
auto it = find(m_queue.begin(), m_queue.end(), countryId);
if (it != m_queue.end())
PeekFromQueue(it);
PopFromQueue(it);
NotifyStatusChangedForHierarchy(countryId);
}
} // namespace storage

View file

@ -649,7 +649,7 @@ private:
TCountriesSet const & mwmsInQueue) const;
void PushToJustDownloaded(TQueue::iterator justDownloadedItem);
void PeekFromQueue(TQueue::iterator it);
void PopFromQueue(TQueue::iterator it);
template <class ToDo>
void ForEachAncestorExceptForTheRoot(vector<TCountryTreeNode const *> const & nodes, ToDo && toDo) const;
/// Returns true if |node.Value().Name()| is a disputed territory and false otherwise.

View file

@ -1809,8 +1809,8 @@ UNIT_TEST(StorageTest_FalsePolicy)
auto const countryId = storage.FindCountryIdByFile("Uruguay");
auto const countryFile = storage.GetCountryFile(countryId);
// To prevent interference from other tests and on other tests it's
// better to remove temprorary downloader files.
// To prevent interference with other tests and on other tests it's
// better to remove temporary downloader files.
DeleteDownloaderFilesForCountry(storage.GetCurrentDataVersion(), countryFile);
MY_SCOPE_GUARD(cleanup, [&]() {
DeleteDownloaderFilesForCountry(storage.GetCurrentDataVersion(),