From 63f7d650843fd355746a4965a87d3db4b6144773 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Thu, 23 Dec 2021 19:48:57 +0100 Subject: [PATCH] Make use of automatic conversion between CGFloat and Double --- NvimView/Sources/NvimView/NvimView.swift | 6 +++--- NvimView/Sources/NvimView/Typesetter.swift | 4 ++-- VimR/VimR/BufferList.swift | 2 +- VimR/VimR/FileOutlineView.swift | 6 +++--- VimR/VimR/States.swift | 2 +- Workspace/Sources/Workspace/InnterToolBar.swift | 6 +++--- Workspace/Sources/Workspace/WorkspaceBar.swift | 8 ++++---- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/NvimView/Sources/NvimView/NvimView.swift b/NvimView/Sources/NvimView/NvimView.swift index f58818bd..88e48777 100644 --- a/NvimView/Sources/NvimView/NvimView.swift +++ b/NvimView/Sources/NvimView/NvimView.swift @@ -49,7 +49,7 @@ public class NvimView: NSView, public internal(set) var theme = Theme.default - public var trackpadScrollResistance = 5.cgf + public var trackpadScrollResistance = 5.0 public var usesLiveResize = false @@ -251,7 +251,7 @@ public class NvimView: NSView, let ugrid = UGrid() let cellAttributesCollection = CellAttributesCollection() let drawer: AttributesRunDrawer - var baselineOffset = 0.cgf + var baselineOffset = 0.0 /// We store the last marked text because Cocoa's text input system does the following: /// ν•˜ -> hanja popup -> insertText(ν•˜) -> attributedSubstring...() -> setMarkedText(δΈ‹) -> ... @@ -269,7 +269,7 @@ public class NvimView: NSView, var scrollGuardCounterY = 5 var isCurrentlyPinching = false - var pinchTargetScale = 1.cgf + var pinchTargetScale = 1.0 var pinchBitmap: NSBitmapImageRep? var currentlyResizing = false diff --git a/NvimView/Sources/NvimView/Typesetter.swift b/NvimView/Sources/NvimView/Typesetter.swift index 16894311..6c294e45 100644 --- a/NvimView/Sources/NvimView/Typesetter.swift +++ b/NvimView/Sources/NvimView/Typesetter.swift @@ -38,8 +38,8 @@ final class Typesetter { CTRunGetStringIndices(run, .zero, &indices) var column = -1 - var columnPosition = 0.cgf - var deltaX = 0.cgf + var columnPosition = 0.0 + var deltaX = 0.0 positions.withUnsafeMutableBufferPointer { positionsPtr -> Void in for i in 0.. CGRect { let separatorRect = self.outerSeparatorRect() - let clickDimension = 4.cgf + let clickDimension = 4.0 switch self.location { case .top: