[storage] Removed useless and buggy Store::QueuedCountry ctor.

This commit is contained in:
Yuri Gorshenin 2015-05-13 19:19:27 +03:00 committed by Alex Zolotarev
parent ca3657b589
commit 99ea385a8f
2 changed files with 8 additions and 5 deletions

View file

@ -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)

View file

@ -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);