Index: ui/base/gestures/gesture_recognizer_impl.cc |
diff --git a/ui/base/gestures/gesture_recognizer_impl.cc b/ui/base/gestures/gesture_recognizer_impl.cc |
index 78adfab9c0e6a1b0649a75ecd68f7320a29f96a1..5da69aee94144d44fc63566eb969789b5f84908c 100644 |
--- a/ui/base/gestures/gesture_recognizer_impl.cc |
+++ b/ui/base/gestures/gesture_recognizer_impl.cc |
@@ -132,8 +132,7 @@ GestureConsumer* GestureRecognizerImpl::GetTargetForLocation( |
for (int j = 0; j < GestureSequence::kMaxGesturePoints; ++j) { |
if (!points[j].in_use()) |
continue; |
- gfx::Point delta = |
- points[j].last_touch_position().Subtract(location); |
+ gfx::Vector2d delta = points[j].last_touch_position() - location; |
int distance = delta.x() * delta.x() + delta.y() * delta.y(); |
Peter Kasting
2012/10/30 01:14:14
Nit: Use LengthSquared() and add comments/change n
|
if (!closest_point || distance < closest_distance_squared) { |
closest_point = &points[j]; |