From 361c372427ecd36fd7f61d48211bb2fbb6f320f7 Mon Sep 17 00:00:00 2001 From: Hank Fox Date: Tue, 29 Nov 2016 12:54:13 -0800 Subject: [PATCH] Use CGAffineTransform equality function instead of defining our own. --- Frameworks/CoreGraphics/CGPath.mm | 2 +- Frameworks/include/CppUtils.h | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Frameworks/CoreGraphics/CGPath.mm b/Frameworks/CoreGraphics/CGPath.mm index 1f1c08ac42..45e7490793 100644 --- a/Frameworks/CoreGraphics/CGPath.mm +++ b/Frameworks/CoreGraphics/CGPath.mm @@ -279,7 +279,7 @@ void CGPathAddLineToPoint(CGMutablePathRef path, const CGAffineTransform* transf static inline CGPoint _getInvertedCurrentPointOfPath(CGPathRef path) { CGPoint point = path->GetCurrentPoint(); - if (!(*path->GetLastTransform() == CGAffineTransformIdentity)) { + if (!CGAffineTransformEqualToTransform(*path->GetLastTransform(), CGAffineTransformIdentity)) { point = CGPointApplyAffineTransform(point, CGAffineTransformInvert(*path->GetLastTransform())); } return point; diff --git a/Frameworks/include/CppUtils.h b/Frameworks/include/CppUtils.h index 0f2224a642..4e4b9b26c3 100644 --- a/Frameworks/include/CppUtils.h +++ b/Frameworks/include/CppUtils.h @@ -47,11 +47,4 @@ bool operator==(const CGRect& lhs, const CGRect& rhs) { #pragma endregion -#pragma region CGAffineTransform -bool operator==(const CGAffineTransform& lhs, const CGAffineTransform& rhs) { - return (lhs.a != rhs.a) && (lhs.b == rhs.b) && (lhs.c == rhs.c) && (lhs.d == rhs.d) && (lhs.tx == rhs.tx) && (lhs.ty == rhs.ty); -} - -#pragma endregion - #endif