diff options
author | Anatoliy Tomilov <tomilovanatoliy@gmail.com> | 2020-09-04 13:27:38 +0300 |
---|---|---|
committer | Arsentiy Milchakov <milcars@mapswithme.com> | 2020-09-16 16:08:14 +0300 |
commit | 817ff405663f700d3cfcf77f2016e11bf55f4ac1 (patch) | |
tree | f1d77b232cd86687171519d95133c51687b760ea /drape/overlay_handle.hpp | |
parent | 4819f39d703327f00d1f4ea67d3ee1902bf5f97d (diff) |
[drape] [Booking] Fixes to meet the review comments MAPSME-14544
Diffstat (limited to 'drape/overlay_handle.hpp')
-rw-r--r-- | drape/overlay_handle.hpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drape/overlay_handle.hpp b/drape/overlay_handle.hpp index 4d17405ecc..61782ef75d 100644 --- a/drape/overlay_handle.hpp +++ b/drape/overlay_handle.hpp @@ -61,14 +61,14 @@ struct OverlayID , m_index(index) {} - auto AsTupleRef() const + auto AsTupleOfRefs() const { return std::tie(m_featureId, m_markId, m_tileCoords, m_index); } bool operator==(OverlayID const & overlayId) const { - return AsTupleRef() == overlayId.AsTupleRef(); + return AsTupleOfRefs() == overlayId.AsTupleOfRefs(); } bool operator!=(OverlayID const & overlayId) const @@ -78,13 +78,19 @@ struct OverlayID bool operator<(OverlayID const & overlayId) const { - return AsTupleRef() < overlayId.AsTupleRef(); + return AsTupleOfRefs() < overlayId.AsTupleOfRefs(); } bool operator>(OverlayID const & overlayId) const { return overlayId < *this; } + + friend std::string DebugPrint(OverlayID const & overlayId) + { + return strings::to_string(overlayId.m_featureId.m_index) + "-" + + strings::to_string(overlayId.m_markId) + "-" + strings::to_string(overlayId.m_index); + } }; class OverlayHandle @@ -207,9 +213,8 @@ class SquareHandle : public OverlayHandle public: SquareHandle(OverlayID const & id, dp::Anchor anchor, m2::PointD const & gbPivot, - m2::PointD const & pxSize, m2::PointD const & pxOffset, - uint64_t priority, bool isBound, std::string const & debugStr, - int minVisibleScale, bool isBillboard); + m2::PointD const & pxSize, m2::PointD const & pxOffset, uint64_t priority, + bool isBound, int minVisibleScale, bool isBillboard); m2::RectD GetPixelRect(ScreenBase const & screen, bool perspective) const override; void GetPixelShape(ScreenBase const & screen, bool perspective, Rects & rects) const override; @@ -226,10 +231,6 @@ private: m2::PointD m_gbPivot; m2::PointD m_pxOffset; bool m_isBound; - -#ifdef DEBUG_OVERLAYS_OUTPUT - std::string m_debugStr; -#endif }; uint64_t CalculateOverlayPriority(int minZoomLevel, uint8_t rank, float depth); |