diff --git a/storage/country_info_getter.cpp b/storage/country_info_getter.cpp index a6b356a936..a8efca70f0 100644 --- a/storage/country_info_getter.cpp +++ b/storage/country_info_getter.cpp @@ -179,26 +179,9 @@ void CountryInfoGetter::ForEachCountry(string const & prefix, ToDo && toDo) cons // static unique_ptr CountryInfoReader::CreateCountryInfoReader(Platform const & platform) { - try - { - CountryInfoReader * result; - if (platform::migrate::NeedMigrate()) - { - result = new CountryInfoReader(platform.GetReader(PACKED_POLYGONS_FILE), - platform.GetReader(COUNTRIES_FILE)); - } - else - { - result = new CountryInfoReader(platform.GetReader(PACKED_POLYGONS_MIGRATE_FILE), - platform.GetReader(COUNTRIES_MIGRATE_FILE)); - } - return unique_ptr(result); - } - catch (RootException const & e) - { - LOG(LCRITICAL, ("Can't load needed resources for storage::CountryInfoGetter:", e.Msg())); - } - return unique_ptr(); + if (platform::migrate::NeedMigrate()) + return CreateCountryInfoReaderTwoComponentMwms(platform); + return CreateCountryInfoReaderOneComponentMwms(platform); } // static