diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2023-02-27 17:46:20 +1100 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2023-02-27 17:46:20 +1100 |
commit | e76fbd3f9ba742a1ef789ae215d9a71f9e27ad17 (patch) | |
tree | 6c4d2f5f3bd6ee77ed434c86753c3b18c908ae57 /cocoa/ScintillaView.mm | |
parent | a7641e03b04fe14776d64d51b0f8f914280bf7ca (diff) | |
download | scintilla-mirror-e76fbd3f9ba742a1ef789ae215d9a71f9e27ad17.tar.gz |
Remove unnecessary casts from CGFloat to XYPosition as they are both double.
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r-- | cocoa/ScintillaView.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 705f6a00e..54988f650 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -784,14 +784,14 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { // Only snap for positions inside the document - allow outside // for overshoot. long lineHeight = mOwner.backend->WndProc(Message::TextHeight, 0, 0); - rc.origin.y = std::round(static_cast<XYPOSITION>(rc.origin.y) / lineHeight) * lineHeight; + rc.origin.y = std::round(rc.origin.y / lineHeight) * lineHeight; } // Snap to whole points - on retina displays this avoids visual debris // when scrolling horizontally. if ((rc.origin.x > 0) && (NSMaxX(rc) < contentRect.size.width)) { // Only snap for positions inside the document - allow outside // for overshoot. - rc.origin.x = std::round(static_cast<XYPOSITION>(rc.origin.x)); + rc.origin.x = std::round(rc.origin.x); } return rc; } |