diff --git a/map/bookmark.hpp b/map/bookmark.hpp index 8641700cf5..8577711cbd 100644 --- a/map/bookmark.hpp +++ b/map/bookmark.hpp @@ -87,7 +87,12 @@ public: { } - void SetData(BookmarkData const & data) { m_data = data; SetStyle(m_data.GetType()); } + void SetData(BookmarkData const & data) + { + m_data = data; + SetStyle(m_data.GetType()); + } + BookmarkData const & GetData() const { return m_data; } virtual Type GetMarkType() const override { return UserMark::Type::BOOKMARK; } @@ -97,7 +102,13 @@ public: void SetName(string const & name) { m_data.SetName(name); } /// @return Now its a bookmark color - name of icon file string const & GetType() const { return m_data.GetType(); } - void SetType(string const & type) { m_data.SetType(type); SetStyle(type); } + + void SetType(string const & type) + { + m_data.SetType(type); + SetStyle(type); + } + m2::RectD GetViewport() const { return m2::RectD(GetOrg(), GetOrg()); } string const & GetDescription() const { return m_data.GetDescription(); } diff --git a/map/framework.hpp b/map/framework.hpp index a7eada2e7c..d729cf27e3 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -6,10 +6,10 @@ #include "map/navigator.hpp" #include "map/animator.hpp" +#include "map/api_mark_container.hpp" +#include "map/api_mark_point.hpp" #include "map/bookmark.hpp" #include "map/bookmark_manager.hpp" -#include "map/api_mark_point.hpp" -#include "map/api_mark_container.hpp" #include "map/pin_click_manager.hpp" #include "map/mwm_url.hpp" diff --git a/map/styled_point.cpp b/map/styled_point.cpp index cde0d69820..33d6b5fa6d 100644 --- a/map/styled_point.cpp +++ b/map/styled_point.cpp @@ -3,10 +3,11 @@ graphics::DisplayList * StyledPoint::GetDisplayList(UserMarkDLCache * cache) const { - UserMarkDLCache::Key key = GetStyle().empty() ? GetContainer()->GetDefaultKey() - : UserMarkDLCache::Key(GetStyle(), - graphics::EPosAbove, - GetContainer()->GetDepth()); + UserMarkContainer const * container = GetContainer(); + UserMarkDLCache::Key const key = GetStyle().empty() ? container->GetDefaultKey() + : UserMarkDLCache::Key(GetStyle(), + graphics::EPosAbove, + container->GetDepth()); return cache->FindUserMark(key); } diff --git a/map/user_mark_container.cpp b/map/user_mark_container.cpp index 64aba64637..f3527132d1 100644 --- a/map/user_mark_container.cpp +++ b/map/user_mark_container.cpp @@ -179,9 +179,7 @@ namespace UserMarkDLCache::Key UserMarkContainer::GetDefaultKey() const { - return UserMarkDLCache::Key(GetTypeName(), - graphics::EPosCenter, - GetDepth()); + return UserMarkDLCache::Key(GetTypeName(), graphics::EPosCenter, GetDepth()); } void UserMarkContainer::InitStaticMarks(UserMarkContainer * container)