[new downloader] Removing unnecessary code section for single mwm case in routing_mapping.

This commit is contained in:
Vladimir Byko-Ianko 2016-02-03 15:37:04 +03:00 committed by Sergey Yershov
parent 640d7ad560
commit 706e9279cd

View file

@ -27,8 +27,9 @@ namespace
*/
bool CheckMwmConsistency(LocalCountryFile const & localFile)
{
if (localFile.GetPath(MapOptions::CarRouting) == localFile.GetPath(MapOptions::Map))
if (version::IsSingleMwm(localFile.GetVersion()))
return true;
ModelReaderPtr r1 = FilesContainerR(localFile.GetPath(MapOptions::CarRouting))
.GetReader(VERSION_FILE_TAG);
ReaderSrc src1(r1.GetPtr());
@ -63,14 +64,6 @@ RoutingMapping::RoutingMapping(string const & countryFile, MwmSet & index)
LocalCountryFile const & localFile = m_handle.GetInfo()->GetLocalFile();
if (version::IsSingleMwm(localFile.GetVersion()))
{
m_container.Open(localFile.GetPath(MapOptions::Map));
m_mwmId = m_handle.GetId();
m_error = IRouter::ResultCode::NoError;
return;
}
if (!HasOptions(localFile.GetFiles(), MapOptions::MapWithCarRouting))
{
m_error = IRouter::ResultCode::RouteFileNotExist;