aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-03 07:44:07 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-03 07:44:07 +1000
commita89c20b95b80e21061ed34289e043616221320fb (patch)
treefb59505f5df4e582bbb9fe9ab384bb8e2ed7c5d7 /src/Editor.cxx
parent62ac2fcca76ba15f69ad050b9959088100481096 (diff)
downloadscintilla-mirror-a89c20b95b80e21061ed34289e043616221320fb.tar.gz
Backport: Avoid casts.
Backport of changeset 6787:b690b9e1e111.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx8
1 files changed, 4 insertions, 4 deletions
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<int>(ptStart.x - ptNow.x);
- const int yMove = static_cast<int>(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() {