From a89c20b95b80e21061ed34289e043616221320fb Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 3 May 2018 07:44:07 +1000 Subject: Backport: Avoid casts. Backport of changeset 6787:b690b9e1e111. --- src/Editor.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 356282882..f30c08a59 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4228,10 +4228,10 @@ void Editor::DisplayCursor(Window::Cursor c) { } bool Editor::DragThreshold(Point ptStart, Point ptNow) { - const int xMove = static_cast(ptStart.x - ptNow.x); - const int yMove = static_cast(ptStart.y - ptNow.y); - const int distanceSquared = xMove * xMove + yMove * yMove; - return distanceSquared > 16; + const XYPOSITION xMove = ptStart.x - ptNow.x; + const XYPOSITION yMove = ptStart.y - ptNow.y; + const XYPOSITION distanceSquared = xMove * xMove + yMove * yMove; + return distanceSquared > 16.0f; } void Editor::StartDrag() { -- cgit v1.2.3