From 12febf1a5edd713d709880e27d93779f63352944 Mon Sep 17 00:00:00 2001 From: Yuri Gorshenin Date: Thu, 26 Oct 2017 15:12:55 +0300 Subject: Review fixes. --- storage/storage.cpp | 8 ++++---- storage/storage.hpp | 2 +- storage/storage_tests/storage_tests.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/storage/storage.cpp b/storage/storage.cpp index 383c8d1002..d9d0eb0a9b 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -839,7 +839,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(); @@ -1172,7 +1172,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(); } @@ -1772,7 +1772,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); @@ -1897,7 +1897,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 diff --git a/storage/storage.hpp b/storage/storage.hpp index bc14ad7b2b..1f1240948b 100644 --- a/storage/storage.hpp +++ b/storage/storage.hpp @@ -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 void ForEachAncestorExceptForTheRoot(vector const & nodes, ToDo && toDo) const; /// Returns true if |node.Value().Name()| is a disputed territory and false otherwise. diff --git a/storage/storage_tests/storage_tests.cpp b/storage/storage_tests/storage_tests.cpp index e246502796..792f1dba8f 100644 --- a/storage/storage_tests/storage_tests.cpp +++ b/storage/storage_tests/storage_tests.cpp @@ -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(), -- cgit v1.2.3