diff options
author | VladiMihaylenko <vxmihaylenko@gmail.com> | 2016-03-24 11:37:01 +0300 |
---|---|---|
committer | VladiMihaylenko <vxmihaylenko@gmail.com> | 2016-03-24 12:39:51 +0300 |
commit | 7cb421155fa177d031ab17bfe8bc35b3ad0f07f9 (patch) | |
tree | a98cba2845f55c7af7d47dfb4782487e97dbb880 /indexer/feature_decl.cpp | |
parent | 9cd62d4b14c62c13344a62732ce6022209db1e6c (diff) |
[omim] Changed getting mwm's info logic.
Diffstat (limited to 'indexer/feature_decl.cpp')
-rw-r--r-- | indexer/feature_decl.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/indexer/feature_decl.cpp b/indexer/feature_decl.cpp index e6f8ff2d4e..9ad4ac8572 100644 --- a/indexer/feature_decl.cpp +++ b/indexer/feature_decl.cpp @@ -21,12 +21,18 @@ string DebugPrint(feature::EGeomType type) } } -pair<FeatureID::MwmName, FeatureID::MwmVersion> FeatureID::GetMwmNameAndVersion() const -{ - if (!IsValid()) - return {"INVALID", 0}; +// static +char const * const FeatureID::kInvalidFileName = "INVALID"; +// static +int64_t const FeatureID::kInvalidMwmVersion = -1; + - auto const & mwmInfo = m_mwmId.GetInfo(); - return {mwmInfo->GetCountryName(), mwmInfo->GetVersion()}; +string FeatureID::GetMwmName() const +{ + return IsValid() ? m_mwmId.GetInfo()->GetCountryName() : kInvalidFileName; } +int64_t FeatureID::GetMwmVersion() const +{ + return IsValid() ? m_mwmId.GetInfo()->GetVersion() : kInvalidMwmVersion; +} |