From e76fbd3f9ba742a1ef789ae215d9a71f9e27ad17 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Mon, 27 Feb 2023 17:46:20 +1100 Subject: Remove unnecessary casts from CGFloat to XYPosition as they are both double. --- cocoa/ScintillaView.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cocoa/ScintillaView.mm') 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(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(rc.origin.x)); + rc.origin.x = std::round(rc.origin.x); } return rc; } -- cgit v1.2.3