From 7e695e30c4f528cd298e3ba264d0ff40a21d22f1 Mon Sep 17 00:00:00 2001 From: Alisa Mylnikova Date: Thu, 11 Jun 2020 12:31:18 +0700 Subject: [PATCH] Fix some warnings --- Source/platform/iOS/Common_iOS.swift | 2 +- Source/platform/macOS/Common_macOS.swift | 2 +- Source/utils/CGMappings.swift | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/platform/iOS/Common_iOS.swift b/Source/platform/iOS/Common_iOS.swift index 9e2f21e6..3a25ac25 100644 --- a/Source/platform/iOS/Common_iOS.swift +++ b/Source/platform/iOS/Common_iOS.swift @@ -100,7 +100,7 @@ extension UIScreen { } extension UIBezierPath { - var usesEvenOddFillRule: Bool { + var mUsesEvenOddFillRule: Bool { return self.usesEvenOddFillRule } } diff --git a/Source/platform/macOS/Common_macOS.swift b/Source/platform/macOS/Common_macOS.swift index d870d1f2..f667c3e8 100644 --- a/Source/platform/macOS/Common_macOS.swift +++ b/Source/platform/macOS/Common_macOS.swift @@ -185,7 +185,7 @@ extension NSWindow { } extension NSBezierPath { - var usesEvenOddFillRule: Bool { + var mUsesEvenOddFillRule: Bool { return self.windingRule == .evenOdd } } diff --git a/Source/utils/CGMappings.swift b/Source/utils/CGMappings.swift index 45a96873..6fe5042e 100644 --- a/Source/utils/CGMappings.swift +++ b/Source/utils/CGMappings.swift @@ -157,7 +157,7 @@ public extension Node { extension MBezierPath { public func toMacaw() -> Path { - let fillRule: FillRule = self.usesEvenOddFillRule ? .evenodd : .nonzero + let fillRule: FillRule = self.mUsesEvenOddFillRule ? .evenodd : .nonzero return self.cgPath.toMacaw(fillRule: fillRule) } @@ -178,7 +178,7 @@ extension CGPath { } var segments = [PathSegment]() - self.forEach(body: { (element: CGPathElement) in + self.forEach { (element: CGPathElement) in let segment: PathSegment switch element.type { @@ -196,7 +196,7 @@ extension CGPath { fatalError("Unknown element type: \(element.type)") } segments.append(segment) - }) + } return Path(segments: segments, fillRule: .nonzero) }