diff options
author | vng <viktor.govako@gmail.com> | 2015-07-15 15:39:53 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:57:11 +0300 |
commit | 05c79ca2a68b7950f7cf5a26a28ea176deee7a00 (patch) | |
tree | 0d987664e8f3974b3f7545f10b6371a7005541b1 /indexer/mwm_set.cpp | |
parent | 29aa3a7d7d7c30a3024456cfb4c11c1406986dfc (diff) |
Factor out DebugPrint for MwmSet::MwmId.
Diffstat (limited to 'indexer/mwm_set.cpp')
-rw-r--r-- | indexer/mwm_set.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indexer/mwm_set.cpp b/indexer/mwm_set.cpp index d176473a9b..7f1b05718c 100644 --- a/indexer/mwm_set.cpp +++ b/indexer/mwm_set.cpp @@ -8,6 +8,8 @@ #include "base/stl_add.hpp" #include "std/algorithm.hpp" +#include "std/sstream.hpp" + using platform::CountryFile; using platform::LocalCountryFile; @@ -24,6 +26,16 @@ MwmInfo::MwmTypeT MwmInfo::GetType() const return COASTS; } +string DebugPrint(MwmSet::MwmId const & id) +{ + ostringstream ss; + if (id.m_info.get()) + ss << "MwmId [" << id.m_info->GetCountryName() << "]"; + else + ss << "MwmId [invalid]"; + return ss.str(); +} + MwmSet::MwmHandle::MwmHandle() : m_mwmSet(nullptr), m_mwmId(), m_value(nullptr) {} MwmSet::MwmHandle::MwmHandle(MwmSet & mwmSet, MwmId const & mwmId) |