Review fixes

This commit is contained in:
r.kuznetsov 2016-05-17 11:08:08 +03:00
parent 63c3d91d2d
commit 224918f2c0
6 changed files with 8 additions and 12 deletions

View file

@ -148,7 +148,7 @@ void CacheUserPoints(UserMarksProvider const * provider,
AlignHorizontal(pxSize.x * 0.5f, anchor, left, right);
AlignVertical(pxSize.y * 0.5f, anchor, up, down);
m2::PointD const & pixelOffset = pointMark->GetPixelOffset();
m2::PointD const pixelOffset = pointMark->GetPixelOffset();
glsl::vec2 const offset(pixelOffset.x, pixelOffset.y);
buffer.emplace_back(pos, left + down + offset, glsl::ToVec2(texRect.LeftTop()), runAnim);

View file

@ -16,7 +16,7 @@ class UserPointMark
public:
virtual ~UserPointMark() {}
virtual m2::PointD const & GetPivot() const = 0;
virtual m2::PointD const & GetPixelOffset() const = 0;
virtual m2::PointD GetPixelOffset() const = 0;
virtual string GetSymbolName() const = 0;
virtual dp::Anchor GetAnchor() const = 0;
virtual float GetDepth() const = 0;

View file

@ -51,10 +51,7 @@ UserMark::Type ApiMarkPoint::GetMarkType() const
return UserMark::Type::API;
}
m2::PointD const & ApiMarkPoint::GetPixelOffset() const
m2::PointD ApiMarkPoint::GetPixelOffset() const
{
static m2::PointD const s_centre(0.0, 0.0);
static m2::PointD const s_offset(0.0, 3.0);
return m_style.empty() ? s_centre : s_offset;
return m_style.empty() ? m2::PointD(0.0, 0.0) : m2::PointD(0.0, 3.0);
}

View file

@ -27,7 +27,7 @@ public:
string GetSymbolName() const override;
UserMark::Type GetMarkType() const override;
m2::PointD const & GetPixelOffset() const override;
m2::PointD GetPixelOffset() const override;
string const & GetName() const { return m_name; }
void SetName(string const & name) { m_name = name; }

View file

@ -17,10 +17,9 @@ m2::PointD const & UserMark::GetPivot() const
return m_ptOrg;
}
m2::PointD const & UserMark::GetPixelOffset() const
m2::PointD UserMark::GetPixelOffset() const
{
static m2::PointD const s_centre(0.0, 0.0);
return s_centre;
return m2::PointD(0.0, 0.0);
}
dp::Anchor UserMark::GetAnchor() const

View file

@ -36,7 +36,7 @@ public:
// df::UserPointMark overrides.
m2::PointD const & GetPivot() const override;
m2::PointD const & GetPixelOffset() const override;
m2::PointD GetPixelOffset() const override;
dp::Anchor GetAnchor() const override;
float GetDepth() const override;
bool RunCreationAnim() const override;