From 37e80ee4108212ba78770a944e66f812b6bcc52a Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Fri, 16 Mar 2018 13:02:15 +0300 Subject: [PATCH] Minor style fixes --- drape_frontend/my_position_controller.cpp | 92 +++++++++++------------ drape_frontend/my_position_controller.hpp | 36 +++++---- drape_frontend/user_event_stream.cpp | 46 ++++++------ drape_frontend/user_event_stream.hpp | 37 ++++----- 4 files changed, 102 insertions(+), 109 deletions(-) diff --git a/drape_frontend/my_position_controller.cpp b/drape_frontend/my_position_controller.cpp index f09bee1d32..e32e8b23cc 100644 --- a/drape_frontend/my_position_controller.cpp +++ b/drape_frontend/my_position_controller.cpp @@ -11,16 +11,17 @@ #include "base/math.hpp" -#include "std/vector.hpp" - #include "3party/Alohalytics/src/alohalytics.h" +#include +#include +#include +#include + namespace df { - namespace { - int const kPositionOffsetY = 104; int const kPositionOffsetYIn3D = 104; double const kGpsBearingLifetimeSec = 5.0; @@ -37,7 +38,7 @@ int const kMaxScaleZoomLevel = 16; int const kDefaultAutoZoom = 16; double const kUnknownAutoZoom = -1.0; -string LocationModeStatisticsName(location::EMyPositionMode mode) +std::string LocationModeStatisticsName(location::EMyPositionMode mode) { switch (mode) { @@ -57,7 +58,7 @@ string LocationModeStatisticsName(location::EMyPositionMode mode) int GetZoomLevel(ScreenBase const & screen) { - return df::GetZoomLevel(screen.GetScale()); + return static_cast(df::GetZoomLevel(screen.GetScale())); } int GetZoomLevel(ScreenBase const & screen, m2::PointD const & position, double errorRadius) @@ -71,32 +72,32 @@ int GetZoomLevel(ScreenBase const & screen, m2::PointD const & position, double // Calculate zoom value in meters per pixel double CalculateZoomBySpeed(double speed, bool isPerspectiveAllowed) { - using TSpeedScale = pair; - static vector const scales3d = { - make_pair(20.0, 0.25), - make_pair(40.0, 0.75), - make_pair(60.0, 1.5), - make_pair(75.0, 2.5), - make_pair(85.0, 3.75), - make_pair(95.0, 6.0), + using TSpeedScale = std::pair; + static std::vector const scales3d = { + std::make_pair(20.0, 0.25), + std::make_pair(40.0, 0.75), + std::make_pair(60.0, 1.5), + std::make_pair(75.0, 2.5), + std::make_pair(85.0, 3.75), + std::make_pair(95.0, 6.0), }; - static vector const scales2d = { - make_pair(20.0, 0.7), - make_pair(40.0, 1.25), - make_pair(60.0, 2.25), - make_pair(75.0, 3.0), - make_pair(85.0, 3.75), - make_pair(95.0, 6.0), + static std::vector const scales2d = { + std::make_pair(20.0, 0.7), + std::make_pair(40.0, 1.25), + std::make_pair(60.0, 2.25), + std::make_pair(75.0, 3.0), + std::make_pair(85.0, 3.75), + std::make_pair(95.0, 6.0), }; - vector const & scales = isPerspectiveAllowed ? scales3d : scales2d; + std::vector const & scales = isPerspectiveAllowed ? scales3d : scales2d; double const kDefaultSpeed = 80.0; if (speed < 0.0) speed = kDefaultSpeed; else - speed *= 3.6; // convert speed from m/s to km/h + speed *= 3.6; // convert speed from m/s to km/h. size_t i = 0; for (size_t sz = scales.size(); i < sz; ++i) @@ -120,13 +121,12 @@ double CalculateZoomBySpeed(double speed, bool isPerspectiveAllowed) return zoom / vs; } - -} // namespace +} // namespace MyPositionController::MyPositionController(Params && params) : m_mode(location::PendingPosition) , m_desiredInitMode(params.m_initMode) - , m_modeChangeCallback(move(params.m_myPositionModeCallback)) + , m_modeChangeCallback(std::move(params.m_myPositionModeCallback)) , m_hints(params.m_hints) , m_isInRouting(params.m_isRoutingActive) , m_needBlockAnimation(false) @@ -173,10 +173,6 @@ MyPositionController::MyPositionController(Params && params) m_modeChangeCallback(m_mode, m_isInRouting); } -MyPositionController::~MyPositionController() -{ -} - void MyPositionController::UpdatePosition() { UpdateViewport(kDoNotChangeZoom); @@ -232,9 +228,9 @@ void MyPositionController::DragStarted() void MyPositionController::DragEnded(m2::PointD const & distance) { - float const kBindingDistance = 0.1; + float const kBindingDistance = 0.1f; m_needBlockAnimation = false; - if (distance.Length() > kBindingDistance * min(m_pixelRect.SizeX(), m_pixelRect.SizeY())) + if (distance.Length() > kBindingDistance * std::min(m_pixelRect.SizeX(), m_pixelRect.SizeY())) StopLocationFollow(); UpdateViewport(kDoNotChangeZoom); @@ -304,7 +300,7 @@ void MyPositionController::CorrectGlobalScalePoint(m2::PointD & pt) const void MyPositionController::SetRenderShape(drape_ptr && shape) { - m_shape = move(shape); + m_shape = std::move(shape); } void MyPositionController::ResetRenderShape() @@ -314,7 +310,7 @@ void MyPositionController::ResetRenderShape() void MyPositionController::NextMode(ScreenBase const & screen) { - string const kAlohalyticsClickEvent = "$onClick"; + std::string const kAlohalyticsClickEvent = "$onClick"; // Skip switching to next mode while we are waiting for position. if (IsWaitingForLocation()) @@ -338,7 +334,7 @@ void MyPositionController::NextMode(ScreenBase const & screen) int const currentZoom = GetZoomLevel(screen); int preferredZoomLevel = kDoNotChangeZoom; if (currentZoom < kZoomThreshold) - preferredZoomLevel = min(GetZoomLevel(screen, m_position, m_errorRadius), kMaxScaleZoomLevel); + preferredZoomLevel = std::min(GetZoomLevel(screen, m_position, m_errorRadius), kMaxScaleZoomLevel); // In routing not-follow -> follow-and-rotate, otherwise not-follow -> follow. if (m_mode == location::NotFollow) @@ -364,7 +360,7 @@ void MyPositionController::NextMode(ScreenBase const & screen) if (m_mode == location::FollowAndRotate) { if (m_isInRouting && screen.isPerspective()) - preferredZoomLevel = GetZoomLevel(ScreenBase::GetStartPerspectiveScale() * 1.1); + preferredZoomLevel = static_cast(GetZoomLevel(ScreenBase::GetStartPerspectiveScale() * 1.1)); ChangeMode(location::Follow); ChangeModelView(m_position, 0.0, m_visiblePixelRect.Center(), preferredZoomLevel); } @@ -571,9 +567,9 @@ void MyPositionController::Render(ScreenBase const & screen, int zoomLevel, m_shape->SetPositionObsolete(m_positionIsObsolete); m_shape->SetPosition(GetDrawablePosition()); - m_shape->SetAzimuth(GetDrawableAzimut()); + m_shape->SetAzimuth(static_cast(GetDrawableAzimut())); m_shape->SetIsValidAzimuth(IsRotationAvailable()); - m_shape->SetAccuracy(m_errorRadius); + m_shape->SetAccuracy(static_cast(m_errorRadius)); m_shape->SetRoutingMode(IsInRouting()); m_shape->RenderAccuracy(screen, zoomLevel, mng, commonUniforms); @@ -711,10 +707,15 @@ void MyPositionController::UpdateViewport(int zoomLevel) return; if (m_mode == location::Follow) + { ChangeModelView(m_position, zoomLevel); + } else if (m_mode == location::FollowAndRotate) + { ChangeModelView(m_position, m_drawDirection, - m_isInRouting ? GetRoutingRotationPixelCenter() : m_visiblePixelRect.Center(), zoomLevel); + m_isInRouting ? GetRoutingRotationPixelCenter() : m_visiblePixelRect.Center(), + zoomLevel); + } } m2::PointD MyPositionController::GetRotationPixelCenter() const @@ -730,8 +731,8 @@ m2::PointD MyPositionController::GetRotationPixelCenter() const m2::PointD MyPositionController::GetRoutingRotationPixelCenter() const { - return m2::PointD(m_visiblePixelRect.Center().x, - m_visiblePixelRect.maxY() - m_positionYOffset * VisualParams::Instance().GetVisualScale()); + return {m_visiblePixelRect.Center().x, + m_visiblePixelRect.maxY() - m_positionYOffset * VisualParams::Instance().GetVisualScale()}; } m2::PointD MyPositionController::GetDrawablePosition() @@ -768,7 +769,7 @@ void MyPositionController::CreateAnim(m2::PointD const & oldPos, double oldAzimu { double const moveDuration = PositionInterpolator::GetMoveDuration(oldPos, m_position, screen); double const rotateDuration = AngleInterpolator::GetRotateDuration(oldAzimut, m_drawDirection); - if (df::IsAnimationAllowed(max(moveDuration, rotateDuration), screen)) + if (df::IsAnimationAllowed(std::max(moveDuration, rotateDuration), screen)) { if (IsModeChangeViewport()) { @@ -790,8 +791,8 @@ void MyPositionController::CreateAnim(m2::PointD const & oldPos, double oldAzimu } else { - AnimationSystem::Instance().CombineAnimation(make_unique_dp(oldPos, m_position, moveDuration, - oldAzimut, m_drawDirection)); + AnimationSystem::Instance().CombineAnimation(make_unique_dp( + oldPos, m_position, moveDuration, oldAzimut, m_drawDirection)); } } } @@ -841,5 +842,4 @@ void MyPositionController::DeactivateRouting() ChangeModelView(m_position, 0.0, m_visiblePixelRect.Center(), kDoNotChangeZoom); } } - -} +} // namespace df diff --git a/drape_frontend/my_position_controller.hpp b/drape_frontend/my_position_controller.hpp index 7851065284..e99a106671 100644 --- a/drape_frontend/my_position_controller.hpp +++ b/drape_frontend/my_position_controller.hpp @@ -13,12 +13,11 @@ #include "base/timer.hpp" -#include "std/function.hpp" +#include namespace df { - -using TAnimationCreator = function(ref_ptr)>; +using TAnimationCreator = std::function(ref_ptr)>; class MyPositionController { @@ -26,20 +25,21 @@ public: class Listener { public: - virtual ~Listener() {} + virtual ~Listener() = default; virtual void PositionChanged(m2::PointD const & position, bool hasPosition) = 0; - /// Show map with center in "center" point and current zoom - virtual void ChangeModelView(m2::PointD const & center, int zoomLevel, TAnimationCreator const & parallelAnimCreator) = 0; - /// Change azimuth of current ModelView + // Show map with center in "center" point and current zoom. + virtual void ChangeModelView(m2::PointD const & center, int zoomLevel, + TAnimationCreator const & parallelAnimCreator) = 0; + // Change azimuth of current ModelView. virtual void ChangeModelView(double azimuth, TAnimationCreator const & parallelAnimCreator) = 0; - /// Somehow show map that "rect" will see + // Somehow show map that "rect" will see. virtual void ChangeModelView(m2::RectD const & rect, TAnimationCreator const & parallelAnimCreator) = 0; - /// Show map where "usePos" (mercator) placed in "pxZero" on screen and map rotated around "userPos" + // Show map where "usePos" (mercator) placed in "pxZero" on screen and map rotated around "userPos". virtual void ChangeModelView(m2::PointD const & userPos, double azimuth, m2::PointD const & pxZero, int zoomLevel, Animation::TAction const & onFinishAction, TAnimationCreator const & parallelAnimCreator) = 0; - virtual void ChangeModelView(double autoScale, m2::PointD const & userPos, double azimuth, m2::PointD const & pxZero, - TAnimationCreator const & parallelAnimCreator) = 0; + virtual void ChangeModelView(double autoScale, m2::PointD const & userPos, double azimuth, + m2::PointD const & pxZero, TAnimationCreator const & parallelAnimCreator) = 0; }; struct Params @@ -55,7 +55,7 @@ public: , m_hints(hints) , m_isRoutingActive(isRoutingActive) , m_isAutozoomEnabled(isAutozoomEnabled) - , m_myPositionModeCallback(move(fn)) + , m_myPositionModeCallback(std::move(fn)) {} location::EMyPositionMode m_initMode; @@ -66,8 +66,7 @@ public: location::TMyPositionModeChanged m_myPositionModeCallback; }; - MyPositionController(Params && params); - ~MyPositionController(); + explicit MyPositionController(Params && params); void UpdatePosition(); void OnUpdateScreen(ScreenBase const & screen); @@ -169,11 +168,11 @@ private: drape_ptr m_shape; ref_ptr m_listener; - double m_errorRadius; // error radius in mercator + double m_errorRadius; // error radius in mercator. double m_horizontalAccuracy; - m2::PointD m_position; // position in mercator + m2::PointD m_position; // position in mercator. double m_drawDirection; - m2::PointD m_oldPosition; // position in mercator + m2::PointD m_oldPosition; // position in mercator. double m_oldDrawDirection; bool m_enablePerspectiveInRouting; @@ -208,5 +207,4 @@ private: bool m_notFollowAfterPending; }; - -} +} // namespace df diff --git a/drape_frontend/user_event_stream.cpp b/drape_frontend/user_event_stream.cpp index 4ae881f444..9beb05c155 100644 --- a/drape_frontend/user_event_stream.cpp +++ b/drape_frontend/user_event_stream.cpp @@ -32,10 +32,8 @@ using std::chrono::milliseconds; namespace df { - namespace { - uint64_t const kDoubleTapPauseMs = 250; uint64_t const kLongTouchMs = 500; uint64_t const kKineticDelayMs = 500; @@ -52,8 +50,7 @@ size_t GetValidTouchesCount(std::array const & touches) return result; } - -} // namespace +} // namespace #ifdef DEBUG char const * UserEventStream::BEGIN_DRAG = "BeginDrag"; @@ -119,8 +116,8 @@ uint8_t TouchEvent::GetSecondMaskedPointer() const size_t TouchEvent::GetMaskedCount() { - return static_cast(GetFirstMaskedPointer() != INVALID_MASKED_POINTER) + - static_cast(GetSecondMaskedPointer() != INVALID_MASKED_POINTER); + return static_cast(GetFirstMaskedPointer() != INVALID_MASKED_POINTER) + + static_cast(GetSecondMaskedPointer() != INVALID_MASKED_POINTER); } void TouchEvent::Swap() @@ -143,8 +140,7 @@ UserEventStream::UserEventStream() , m_animationSystem(AnimationSystem::Instance()) , m_startDragOrg(m2::PointD::Zero()) , m_startDoubleTapAndHold(m2::PointD::Zero()) -{ -} +{} void UserEventStream::AddEvent(drape_ptr && event) { @@ -321,7 +317,8 @@ bool UserEventStream::OnSetScale(ref_ptr scaleEvent) auto followAnim = m_animationSystem.FindAnimation(Animation::Type::MapFollow); if (followAnim == nullptr) { - auto const parallelAnim = m_animationSystem.FindAnimation(Animation::Type::Parallel, kParallelFollowAnim.c_str()); + auto const parallelAnim = m_animationSystem.FindAnimation( + Animation::Type::Parallel, kParallelFollowAnim.c_str()); if (parallelAnim != nullptr) followAnim = parallelAnim->FindAnimation(Animation::Type::MapFollow); } @@ -369,7 +366,8 @@ bool UserEventStream::OnSetAnyRect(ref_ptr anyRectEvent) bool UserEventStream::OnSetRect(ref_ptr rectEvent) { - return SetRect(rectEvent->GetRect(), rectEvent->GetZoom(), rectEvent->GetApplyRotation(), rectEvent->IsAnim(), + return SetRect(rectEvent->GetRect(), rectEvent->GetZoom(), + rectEvent->GetApplyRotation(), rectEvent->IsAnim(), rectEvent->GetParallelAnimCreator()); } @@ -450,7 +448,8 @@ bool UserEventStream::SetAngle(double azimuth, TAnimationCreator const & paralle return SetScreen(screen, true /* isAnim */, parallelAnimCreator); } -bool UserEventStream::SetRect(m2::RectD rect, int zoom, bool applyRotation, bool isAnim, TAnimationCreator const & parallelAnimCreator) +bool UserEventStream::SetRect(m2::RectD rect, int zoom, bool applyRotation, bool isAnim, + TAnimationCreator const & parallelAnimCreator) { CheckMinGlobalRect(rect, kDefault3dScale); CheckMinMaxVisibleScale(rect, zoom, kDefault3dScale); @@ -458,7 +457,8 @@ bool UserEventStream::SetRect(m2::RectD rect, int zoom, bool applyRotation, bool return SetRect(targetRect, isAnim, parallelAnimCreator); } -bool UserEventStream::SetRect(m2::AnyRectD const & rect, bool isAnim, TAnimationCreator const & parallelAnimCreator) +bool UserEventStream::SetRect(m2::AnyRectD const & rect, bool isAnim, + TAnimationCreator const & parallelAnimCreator) { ScreenBase tmp = GetCurrentScreen(); tmp.SetFromRects(rect, tmp.PixelRectIn3d()); @@ -467,7 +467,8 @@ bool UserEventStream::SetRect(m2::AnyRectD const & rect, bool isAnim, TAnimation return SetScreen(tmp, isAnim, parallelAnimCreator); } -bool UserEventStream::SetScreen(ScreenBase const & endScreen, bool isAnim, TAnimationCreator const & parallelAnimCreator) +bool UserEventStream::SetScreen(ScreenBase const & endScreen, bool isAnim, + TAnimationCreator const & parallelAnimCreator) { if (isAnim) { @@ -611,7 +612,6 @@ void UserEventStream::SetAutoPerspective(bool isAutoPerspective) else m_navigator.Disable3dMode(); m_navigator.SetAutoPerspective(isAutoPerspective); - return; } void UserEventStream::ResetAnimations(Animation::Type animType, bool rewind, bool finishAll) @@ -662,6 +662,7 @@ void UserEventStream::CheckAutoRotate() { if (GetCurrentScreen().isPerspective()) return; + double const kMaxAutoRotateAngle = 25.0 * math::pi / 180.0; double const angle = fabs(GetCurrentScreen().GetAngle()); if (angle < kMaxAutoRotateAngle || (math::twicePi - angle) < kMaxAutoRotateAngle) @@ -793,7 +794,7 @@ bool UserEventStream::TouchMove(array const & touches) case STATE_TAP_TWO_FINGERS: if (touchCount == 2) { - float const threshold = static_cast(kDragThreshold); + auto const threshold = static_cast(kDragThreshold); if (m_twoFingersTouches[0].SquareLength(touches[0].m_location) > threshold || m_twoFingersTouches[1].SquareLength(touches[1].m_location) > threshold) BeginScale(touches[0], touches[1]); @@ -1107,7 +1108,7 @@ void UserEventStream::DetectShortTap(Touch const & touch) if (DetectForceTap(touch)) return; - uint64_t const ms = m_touchTimer.TimeElapsedAs().count(); + auto const ms = m_touchTimer.TimeElapsedAs().count(); if (ms > kDoubleTapPauseMs) { m_state = STATE_EMPTY; @@ -1123,7 +1124,7 @@ void UserEventStream::DetectLongTap(Touch const & touch) if (DetectForceTap(touch)) return; - uint64_t const ms = m_touchTimer.TimeElapsedAs().count(); + auto const ms = m_touchTimer.TimeElapsedAs().count(); if (ms > kLongTouchMs) { TEST_CALL(LONG_TAP_DETECTED); @@ -1135,7 +1136,7 @@ void UserEventStream::DetectLongTap(Touch const & touch) bool UserEventStream::DetectDoubleTap(Touch const & touch) { - uint64_t const ms = m_touchTimer.TimeElapsedAs().count(); + auto const ms = m_touchTimer.TimeElapsedAs().count(); if (m_state != STATE_WAIT_DOUBLE_TAP || ms > kDoubleTapPauseMs) return false; @@ -1175,7 +1176,8 @@ void UserEventStream::EndTapDetector(Touch const & touch) void UserEventStream::CancelTapDetector() { TEST_CALL(CANCEL_TAP_DETECTOR); - ASSERT(m_state == STATE_TAP_DETECTION || m_state == STATE_WAIT_DOUBLE_TAP || m_state == STATE_WAIT_DOUBLE_TAP_HOLD, ()); + ASSERT(m_state == STATE_TAP_DETECTION || m_state == STATE_WAIT_DOUBLE_TAP || + m_state == STATE_WAIT_DOUBLE_TAP_HOLD, ()); m_state = STATE_EMPTY; } @@ -1225,7 +1227,8 @@ void UserEventStream::UpdateDoubleTapAndHold(Touch const & touch) TEST_CALL(DOUBLE_TAP_AND_HOLD); ASSERT_EQUAL(m_state, STATE_DOUBLE_TAP_HOLD, ()); float const kPowerModifier = 10.0f; - float const scaleFactor = exp(kPowerModifier * (touch.m_location.y - m_startDoubleTapAndHold.y) / GetCurrentScreen().PixelRectIn3d().SizeY()); + double const scaleFactor = exp(kPowerModifier * (touch.m_location.y - m_startDoubleTapAndHold.y) / + GetCurrentScreen().PixelRectIn3d().SizeY()); m_startDoubleTapAndHold = touch.m_location; m2::PointD scaleCenter = m_startDragOrg; @@ -1260,5 +1263,4 @@ void UserEventStream::SetKineticScrollEnabled(bool enabled) if (!m_kineticScrollEnabled) m_scroller.Cancel(); } - -} +} // namespace df diff --git a/drape_frontend/user_event_stream.hpp b/drape_frontend/user_event_stream.hpp index 737a0664df..6eeda65ab8 100644 --- a/drape_frontend/user_event_stream.hpp +++ b/drape_frontend/user_event_stream.hpp @@ -20,7 +20,6 @@ namespace df { - int const kDoNotChangeZoom = -1; double const kDoNotAutoZoom = -1.0; @@ -43,7 +42,7 @@ public: VisibleViewport }; - virtual ~UserEvent() {} + virtual ~UserEvent() = default; virtual EventType GetType() const = 0; }; @@ -61,8 +60,7 @@ public: : m_type(TOUCH_CANCEL) , m_timeStamp(my::Timer::LocalTime()) , m_pointersMask(0xFFFF) - { - } + {} enum ETouchType { @@ -121,8 +119,7 @@ public: : m_factor(factor) , m_pxPoint(pxPoint) , m_isAnim(isAnim) - { - } + {} EventType GetType() const override { return UserEvent::EventType::Scale; } @@ -147,8 +144,7 @@ public: , m_isAnim(isAnim) , m_trackVisibleViewport(trackVisibleViewport) , m_parallelAnimCreator(parallelAnimCreator) - { - } + {} EventType GetType() const override { return UserEvent::EventType::SetCenter; } @@ -176,8 +172,7 @@ public: , m_zoom(zoom) , m_isAnim(isAnim) , m_parallelAnimCreator(parallelAnimCreator) - { - } + {} EventType GetType() const override { return UserEvent::EventType::SetRect; } @@ -228,8 +223,7 @@ public: , m_isAnim(true) , m_onFinishAction(nullptr) , m_parallelAnimCreator(parallelAnimCreator) - { - } + {} FollowAndRotateEvent(m2::PointD const & userPos, m2::PointD const & pixelZero, double azimuth, int preferredZoomLevel, @@ -273,7 +267,7 @@ private: class SetAutoPerspectiveEvent : public UserEvent { public: - SetAutoPerspectiveEvent(bool isAutoPerspective) + explicit SetAutoPerspectiveEvent(bool isAutoPerspective) : m_isAutoPerspective(isAutoPerspective) {} @@ -288,7 +282,7 @@ private: class RotateEvent : public UserEvent { public: - RotateEvent(double targetAzimut, TAnimationCreator const & parallelAnimCreator = nullptr) + explicit RotateEvent(double targetAzimut, TAnimationCreator const & parallelAnimCreator = nullptr) : m_targetAzimut(targetAzimut) , m_parallelAnimCreator(parallelAnimCreator) {} @@ -321,7 +315,7 @@ private: class SetVisibleViewportEvent : public UserEvent { public: - SetVisibleViewportEvent(m2::RectD const & rect) + explicit SetVisibleViewportEvent(m2::RectD const & rect) : m_rect(rect) {} @@ -339,7 +333,7 @@ public: class Listener { public: - virtual ~Listener() {} + virtual ~Listener() = default; virtual void OnTap(m2::PointD const & pt, bool isLong) = 0; virtual void OnForceTap(m2::PointD const & pt) = 0; @@ -359,7 +353,8 @@ public: virtual void OnTouchMapAction() = 0; - virtual bool OnNewVisibleViewport(m2::RectD const & oldViewport, m2::RectD const & newViewport, m2::PointD & gOffset) = 0; + virtual bool OnNewVisibleViewport(m2::RectD const & oldViewport, m2::RectD const & newViewport, + m2::PointD & gOffset) = 0; }; UserEventStream(); @@ -465,7 +460,8 @@ private: void ApplyAnimations(); void ResetAnimations(Animation::Type animType, bool rewind = true, bool finishAll = false); - void ResetAnimations(Animation::Type animType, string const & customType, bool rewind = true, bool finishAll = false); + void ResetAnimations(Animation::Type animType, string const & customType, + bool rewind = true, bool finishAll = false); void ResetMapPlaneAnimations(); bool InterruptFollowAnimations(bool force); @@ -500,8 +496,6 @@ private: bool m_modelViewChanged = false; - std::unique_ptr m_pendingEvent; - ref_ptr m_listener; #ifdef DEBUG @@ -515,5 +509,4 @@ private: my::Timer m_kineticTimer; bool m_kineticScrollEnabled = true; }; - -} +} // namespace df