forked from organicmaps/organicmaps
[storage] got rid using mapOptions::Nothing option
This commit is contained in:
parent
8127322659
commit
440503b584
3 changed files with 0 additions and 14 deletions
|
@ -22,14 +22,12 @@ UNIT_TEST(CountryFile_SmokeTwoComponentMwm)
|
|||
version::FOR_TESTING_TWO_COMPONENT_MWM1);
|
||||
TEST_EQUAL("TestCountry" DATA_FILE_EXTENSION ROUTING_FILE_EXTENSION, routingFileName, ());
|
||||
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::Nothing), ());
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::Map), ());
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::CarRouting), ());
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::MapWithCarRouting), ());
|
||||
|
||||
countryFile.SetRemoteSizes(1 /* mapSize */, 2 /* routingSize */);
|
||||
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::Nothing), ());
|
||||
TEST_EQUAL(1, countryFile.GetRemoteSize(MapOptions::Map), ());
|
||||
TEST_EQUAL(2, countryFile.GetRemoteSize(MapOptions::CarRouting), ());
|
||||
TEST_EQUAL(3, countryFile.GetRemoteSize(MapOptions::MapWithCarRouting), ());
|
||||
|
@ -44,14 +42,12 @@ UNIT_TEST(CountryFile_SmokeOneComponentMwm)
|
|||
|
||||
TEST_EQUAL("TestCountryOneComponent" DATA_FILE_EXTENSION, mapFileName, ());
|
||||
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::Nothing), ());
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::Map), ());
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::CarRouting), ());
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::MapWithCarRouting), ());
|
||||
|
||||
countryFile.SetRemoteSizes(3 /* mapSize */, 0 /* routingSize */);
|
||||
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::Nothing), ());
|
||||
TEST_EQUAL(3, countryFile.GetRemoteSize(MapOptions::Map), ());
|
||||
TEST_EQUAL(0, countryFile.GetRemoteSize(MapOptions::CarRouting), ());
|
||||
TEST_EQUAL(3, countryFile.GetRemoteSize(MapOptions::MapWithCarRouting), ());
|
||||
|
|
|
@ -86,7 +86,6 @@ UNIT_TEST(LocalCountryFile_Smoke)
|
|||
|
||||
TEST_EQUAL("/test-dir", localFile.GetDirectory(), ());
|
||||
|
||||
TEST_EQUAL(0, localFile.GetSize(MapOptions::Nothing), ());
|
||||
TEST_EQUAL(0, localFile.GetSize(MapOptions::Map), ());
|
||||
TEST_EQUAL(0, localFile.GetSize(MapOptions::CarRouting), ());
|
||||
TEST_EQUAL(0, localFile.GetSize(MapOptions::MapWithCarRouting), ());
|
||||
|
|
|
@ -564,9 +564,6 @@ void Storage::DownloadCountry(CountryId const & countryId, MapOptions opt)
|
|||
{
|
||||
CHECK_THREAD_CHECKER(m_threadChecker, ());
|
||||
|
||||
if (opt == MapOptions::Nothing)
|
||||
return;
|
||||
|
||||
if (FindCountryInQueue(countryId) != nullptr)
|
||||
return;
|
||||
|
||||
|
@ -697,8 +694,6 @@ void Storage::DownloadNextFile(QueuedCountry const & country)
|
|||
uint64_t size;
|
||||
auto & p = GetPlatform();
|
||||
|
||||
ASSERT(opt != MapOptions::Nothing, (countryId));
|
||||
|
||||
// Since a downloaded valid diff file may be either with .diff or .diff.ready extension,
|
||||
// we have to check these both cases in order to find
|
||||
// the diff file which is ready to apply.
|
||||
|
@ -1006,8 +1001,6 @@ void Storage::OnMapDownloadFinished(CountryId const & countryId, HttpRequest::St
|
|||
{
|
||||
CHECK_THREAD_CHECKER(m_threadChecker, ());
|
||||
ASSERT(m_didDownload != nullptr, ("Storage::Init wasn't called"));
|
||||
ASSERT_NOT_EQUAL(MapOptions::Nothing, options,
|
||||
("This method should not be called for empty files set."));
|
||||
|
||||
alohalytics::LogEvent("$OnMapDownloadFinished",
|
||||
alohalytics::TStringMap(
|
||||
|
@ -2043,8 +2036,6 @@ MwmSize Storage::GetRemoteSize(CountryFile const & file, MapOptions opt, int64_t
|
|||
{
|
||||
if (version::IsSingleMwm(version))
|
||||
{
|
||||
if (opt == MapOptions::Nothing)
|
||||
return 0;
|
||||
uint64_t size;
|
||||
if (m_diffManager.SizeFor(file.GetName(), size))
|
||||
return size;
|
||||
|
|
Loading…
Add table
Reference in a new issue