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
commit9ffdbac7f017c64ddb7133268b45a8a992389591 (patch)
treef21ea44a7be58883d1aaf9bd3827b74b8843dc65 /src/Editor.cxx
parente680914ac0baa9285554ed574ec6ca6d7686346a (diff)
downloadscintilla-mirror-9ffdbac7f017c64ddb7133268b45a8a992389591.tar.gz
Avoid casts.
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 d0a8f37b3..76e77a016 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() {