diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index f81eb1333b..637f6ed9a8 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -19,7 +19,6 @@ #include "../../../../../platform/location.hpp" #include "../../../../../platform/file_name_utils.hpp" -#include "../../../../../base/logging.hpp" #include "../../../../../base/math.hpp" #include "../../../../../std/shared_ptr.hpp" @@ -281,9 +280,9 @@ namespace android if ((eventType == NV_MULTITOUCH_UP) && (m_isCleanSingleClick)) { double seconds = m_longClickTimer.ElapsedSeconds(); - if ( seconds >= LONG_CLICK_LENGTH_SEC) + if (seconds >= LONG_CLICK_LENGTH_SEC) { - CallLongClickListeners((int)x1,(int) y1); + CallLongClickListeners(static_cast(x1), static_cast(y1)); } if (m_work.GetGuiController()->OnTapEnded(m2::PointD(x1, y1))) return; @@ -518,13 +517,13 @@ namespace android void Framework::CallLongClickListeners(int x, int y) { map::iterator it; - for ( it=m_onLongClickFns.begin() ; it != m_onLongClickFns.end(); it++ ) + for (it = m_onLongClickFns.begin(); it != m_onLongClickFns.end(); it++) { - (*it).second(x,y); + (*it).second(x, y); } } - int Framework::AddLongClickListener(Framework::TOnLongClickListener l) + int Framework::AddLongClickListener(Framework::TOnLongClickListener const & l) { int handle = ++m_onLongClickFnsHandler; m_onLongClickFns[handle] = l; @@ -533,6 +532,6 @@ namespace android void Framework::RemoveLongClickListener(int h) { - m_onLongClickFns.erase(m_onLongClickFns.find(h)); + m_onLongClickFns.erase(h); } } diff --git a/android/jni/com/mapswithme/maps/Framework.hpp b/android/jni/com/mapswithme/maps/Framework.hpp index 303c5e6778..a69cede80a 100644 --- a/android/jni/com/mapswithme/maps/Framework.hpp +++ b/android/jni/com/mapswithme/maps/Framework.hpp @@ -6,7 +6,6 @@ #include "../../../../../map/drawer.hpp" #include "../../../../../map/window_handle.hpp" #include "../../../../../map/feature_vec_model.hpp" -#include "../../../../../base/logging.hpp" #include "../../../../../geometry/avg_vector.hpp" @@ -110,7 +109,7 @@ namespace android void Scale(double k); - int AddLongClickListener(TOnLongClickListener l); + int AddLongClickListener(TOnLongClickListener const & l); void RemoveLongClickListener(int h); diff --git a/android/jni/com/mapswithme/maps/MWMActivity.cpp b/android/jni/com/mapswithme/maps/MWMActivity.cpp index 08ea59d31d..06c838b196 100644 --- a/android/jni/com/mapswithme/maps/MWMActivity.cpp +++ b/android/jni/com/mapswithme/maps/MWMActivity.cpp @@ -7,10 +7,7 @@ #include "../../../nv_event/nv_event.hpp" #include "../../../../../map/country_status_display.hpp" -#include "../../../../../base/logging.hpp" -/* -private native int addOnLongClickListener( l); -private native void removeOnLongClickListener(int h);*/ + //////////////////////////////////////////////////////////////////////////////////////////// extern "C" {