1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-23 19:21:53 +03:00

Inline cgf

- Since cgf is in a separate module, it has a big performance impact when not inlined.
This commit is contained in:
Tae Won Ha 2020-09-18 10:58:03 +02:00
parent 3eb6fa1486
commit 4e60d5878b
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -9,11 +9,15 @@ public func identity<T>(_ input: T) -> T { input }
public extension BinaryFloatingPoint {
@inlinable
@inline(__always)
var cgf: CGFloat { CGFloat(self) }
}
public extension FixedWidthInteger {
@inlinable
@inline(__always)
var cgf: CGFloat { CGFloat(self) }
}