diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2018-04-25 14:20:32 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2018-05-06 19:28:28 +0300 |
commit | dd6ee6e82f61b91346f29b65653c217101250ee8 (patch) | |
tree | 5ad1cd89ad4b3840c7a415e4365385e92b251c06 | |
parent | 034bf651d55891c2172eced8bd85976fe801f900 (diff) |
Output debug priorities as hex numbers
-rw-r--r-- | drape/overlay_handle.cpp | 3 | ||||
-rw-r--r-- | drape_frontend/text_handle.cpp | 16 | ||||
-rw-r--r-- | drape_frontend/text_handle.hpp | 11 |
3 files changed, 16 insertions, 14 deletions
diff --git a/drape/overlay_handle.cpp b/drape/overlay_handle.cpp index 15f8556c7b..d6a6e6a4e7 100644 --- a/drape/overlay_handle.cpp +++ b/drape/overlay_handle.cpp @@ -8,6 +8,7 @@ #include "base/logging.hpp" #include <algorithm> +#include <ios> #include <sstream> namespace dp @@ -248,7 +249,7 @@ bool SquareHandle::IsBound() const { return m_isBound; } std::string SquareHandle::GetOverlayDebugInfo() { std::ostringstream out; - out << "POI Priority(" << GetPriority() << ") " + out << "POI Priority(" << std::hex << GetPriority() << ") " << std::dec << GetOverlayID().m_featureId.m_index << "-" << GetOverlayID().m_index << " " << m_debugStr; return out.str(); diff --git a/drape_frontend/text_handle.cpp b/drape_frontend/text_handle.cpp index 7177b66600..e09b7d30e2 100644 --- a/drape_frontend/text_handle.cpp +++ b/drape_frontend/text_handle.cpp @@ -4,9 +4,11 @@ #include "base/logging.hpp" +#include <ios> +#include <sstream> + namespace df { - TextHandle::TextHandle(dp::OverlayID const & id, strings::UniString const & text, dp::Anchor anchor, uint64_t priority, int fixedHeight, ref_ptr<dp::TextureManager> textureManager, @@ -80,13 +82,13 @@ void TextHandle::SetForceUpdateNormals(bool forceUpdate) const } #ifdef DEBUG_OVERLAYS_OUTPUT -string TextHandle::GetOverlayDebugInfo() +std::string TextHandle::GetOverlayDebugInfo() { - ostringstream out; - out << "Text Priority(" << GetPriority() << ") " << GetOverlayID().m_featureId.m_index - << "-" << GetOverlayID().m_index << " " << strings::ToUtf8(m_text); + std::ostringstream out; + out << "Text Priority(" << std::hex << GetPriority() << ") " << std::dec + << GetOverlayID().m_featureId.m_index << "-" << GetOverlayID().m_index << " " + << strings::ToUtf8(m_text); return out.str(); } #endif - -} // namespace df +} // namespace df diff --git a/drape_frontend/text_handle.hpp b/drape_frontend/text_handle.hpp index 8d8cd8456c..05545baa3f 100644 --- a/drape_frontend/text_handle.hpp +++ b/drape_frontend/text_handle.hpp @@ -6,14 +6,15 @@ #include "base/string_utils.hpp" +#include <string> + namespace dp { - class TextureManager; +class TextureManager; } namespace df { - class TextHandle : public dp::OverlayHandle { public: @@ -37,7 +38,7 @@ public: void SetForceUpdateNormals(bool forceUpdate) const; #ifdef DEBUG_OVERLAYS_OUTPUT - virtual string GetOverlayDebugInfo() override; + virtual std::string GetOverlayDebugInfo() override; #endif protected: @@ -52,6 +53,4 @@ private: bool m_glyphsReady; int m_fixedHeight; }; - - -} // namespace df +} // namespace df |