Minor ApiMarkPoint fix.

This commit is contained in:
Alex Zolotarev 2016-02-12 20:13:13 +03:00 committed by Sergey Yershov
parent 54cc986922
commit 7dd1e3164b
3 changed files with 5 additions and 7 deletions

View file

@ -1645,7 +1645,7 @@ bool Framework::ShowMapForURL(string const & url)
m2::PointD point;
m2::RectD rect;
string name;
UserMark const * apiMark = 0;
ApiMarkPoint const * apiMark = nullptr;
enum ResultT { FAILED, NEED_CLICK, NO_NEED_CLICK };
ResultT result = FAILED;

View file

@ -207,7 +207,7 @@ bool ParsedMapApi::GetViewportRect(m2::RectD & rect) const
}
}
UserMark const * ParsedMapApi::GetSinglePoint() const
ApiMarkPoint const * ParsedMapApi::GetSinglePoint() const
{
ASSERT(m_bmManager != nullptr, ());
UserMarkControllerGuard guard(*m_bmManager, UserMarkType::API_MARK);
@ -215,7 +215,7 @@ UserMark const * ParsedMapApi::GetSinglePoint() const
if (guard.m_controller.GetUserMarkCount() != 1)
return nullptr;
return guard.m_controller.GetUserMark(0);
return static_cast<ApiMarkPoint const *>(guard.m_controller.GetUserMark(0));
}
}

View file

@ -1,12 +1,10 @@
#pragma once
#include "map/user_mark.hpp"
#include "geometry/rect2d.hpp"
#include "std/string.hpp"
class ScalesProcessor;
class ApiMarkPoint;
class BookmarkManager;
namespace url_scheme
@ -41,7 +39,7 @@ public:
/// @name Used in settings map viewport after invoking API.
bool GetViewportRect(m2::RectD & rect) const;
UserMark const * GetSinglePoint() const;
ApiMarkPoint const * GetSinglePoint() const;
private:
bool Parse(Uri const & uri);