Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2015-07-15 15:39:53 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:57:11 +0300
commit05c79ca2a68b7950f7cf5a26a28ea176deee7a00 (patch)
tree0d987664e8f3974b3f7545f10b6371a7005541b1 /indexer/mwm_set.cpp
parent29aa3a7d7d7c30a3024456cfb4c11c1406986dfc (diff)
Factor out DebugPrint for MwmSet::MwmId.
Diffstat (limited to 'indexer/mwm_set.cpp')
-rw-r--r--indexer/mwm_set.cpp12
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)