From 99ea385a8fb3272ed1d757f89b42d48f860aa736 Mon Sep 17 00:00:00 2001 From: Yuri Gorshenin Date: Wed, 13 May 2015 19:19:27 +0300 Subject: [PATCH] [storage] Removed useless and buggy Store::QueuedCountry ctor. --- storage/storage.cpp | 12 ++++++++---- storage/storage.hpp | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/storage/storage.cpp b/storage/storage.cpp index 517d7befe9..8fdf3c03ff 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -50,17 +50,21 @@ namespace storage } */ - Storage::QueuedCountry::QueuedCountry(Storage const & storage, TIndex const & index, TMapOptions opt) + Storage::QueuedCountry::QueuedCountry(Storage const & storage, TIndex const & index, + TMapOptions opt) : m_index(index), m_init(opt), m_left(opt) { m_pFile = &(storage.CountryByIndex(index).GetFile()); // Don't queue files with 0-size on server (empty or absent). - // Downloader has lots of assertions about it. - if ((m_init & TMapOptions::ECarRouting) && (m_pFile->GetRemoteSize(TMapOptions::ECarRouting) > 0)) + // Downloader has lots of assertions about it. If car routing was + // requested for downloading, try download it first. + if ((m_init & TMapOptions::ECarRouting) && + (m_pFile->GetRemoteSize(TMapOptions::ECarRouting) > 0)) { m_current = TMapOptions::ECarRouting; - else + } else { m_init = m_current = m_left = TMapOptions::EMapOnly; + } } void Storage::QueuedCountry::AddOptions(TMapOptions opt) diff --git a/storage/storage.hpp b/storage/storage.hpp index 7f446dbae4..307fd18ad4 100644 --- a/storage/storage.hpp +++ b/storage/storage.hpp @@ -35,7 +35,6 @@ namespace storage TMapOptions m_init, m_left, m_current; public: - explicit QueuedCountry(TIndex const & index) : m_index(index), m_pFile(0) {} QueuedCountry(Storage const & storage, TIndex const & index, TMapOptions opt); void AddOptions(TMapOptions opt);