forked from organicmaps/organicmaps
Fix according to code review.
This commit is contained in:
parent
d39d7542f3
commit
d86c0a6b28
6 changed files with 6 additions and 15 deletions
|
@ -48,7 +48,7 @@ namespace android
|
|||
|
||||
math::AvgVector<float, 3> m_sensors[2];
|
||||
|
||||
shared_ptr<ScheduledTask> m_scheduledTask;
|
||||
scoped_ptr<ScheduledTask> m_scheduledTask;
|
||||
bool m_wasLongClick;
|
||||
|
||||
void StartTouchTask(double x, double y, unsigned ms);
|
||||
|
|
|
@ -32,8 +32,8 @@ void ScheduledTask::Routine::Do()
|
|||
}
|
||||
|
||||
ScheduledTask::ScheduledTask(fn_t const & fn, unsigned ms)
|
||||
: m_routine(new Routine(fn, ms, &m_cond))
|
||||
{
|
||||
m_routine.reset(new Routine(fn, ms, &m_cond));
|
||||
m_thread.Create(m_routine.get());
|
||||
}
|
||||
|
||||
|
|
|
@ -242,14 +242,6 @@ namespace graphics
|
|||
m_tree.ForEachInRect(rect, fn);
|
||||
}
|
||||
|
||||
/*
|
||||
void Overlay::selectOverlayElements(m2::PointD const & pt, list<shared_ptr<OverlayElement> > & res) const
|
||||
{
|
||||
DoPreciseSelectByPoint fn(pt, &res);
|
||||
m_tree.ForEachInRect(m2::RectD(pt - m2::PointD(1, 1), pt + m2::PointD(1, 1)), fn);
|
||||
}
|
||||
*/
|
||||
|
||||
void Overlay::replaceOverlayElement(shared_ptr<OverlayElement> const & oe)
|
||||
{
|
||||
bool isIntersect = false;
|
||||
|
|
|
@ -41,7 +41,6 @@ namespace graphics
|
|||
|
||||
void draw(OverlayRenderer * r, math::Matrix<double, 3, 3> const & m);
|
||||
|
||||
//void selectOverlayElements(m2::PointD const & pt, list<shared_ptr<OverlayElement> > & res) const;
|
||||
void selectOverlayElements(m2::RectD const & rect, list<shared_ptr<OverlayElement> > & res) const;
|
||||
|
||||
void removeOverlayElement(shared_ptr<OverlayElement> const & oe, m2::RectD const & r);
|
||||
|
|
|
@ -1514,15 +1514,15 @@ bool Framework::GetVisiblePOI(m2::PointD const & pxPoint, m2::PointD & pxPivot,
|
|||
|
||||
{
|
||||
// It seems like we don't need to lock frame here.
|
||||
// Locking of overlay and storing items as shared_ptr is enough here.
|
||||
// Overlay locking and storing items as shared_ptr is enough here.
|
||||
//m_renderPolicy->FrameLock();
|
||||
|
||||
m2::PointD const pt = m_navigator.ShiftPoint(pxPoint);
|
||||
double const halfSize = TOUCH_PIXEL_RADIUS * GetVisualScale();
|
||||
|
||||
list<OEPointerT> candidates;
|
||||
m2::RectD rect(pt.x - halfSize, pt.y - halfSize,
|
||||
pt.x + halfSize, pt.y + halfSize);
|
||||
m2::RectD const rect(pt.x - halfSize, pt.y - halfSize,
|
||||
pt.x + halfSize, pt.y + halfSize);
|
||||
|
||||
graphics::Overlay * frameOverlay = m_renderPolicy->FrameOverlay();
|
||||
frameOverlay->lock();
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace qt
|
|||
|
||||
QScaleSlider * m_pScale;
|
||||
|
||||
shared_ptr<ScheduledTask> m_scheduledTasks;
|
||||
scoped_ptr<ScheduledTask> m_scheduledTasks;
|
||||
m2::PointD m_taskPoint;
|
||||
bool m_wasLongClick, m_isCleanSingleClick;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue