Skip to content

Commit

Permalink
Use CGAffineTransform equality function instead of defining our own.
Browse files Browse the repository at this point in the history
  • Loading branch information
MSFTFox committed Nov 29, 2016
1 parent c1e1742 commit 361c372
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion Frameworks/CoreGraphics/CGPath.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions Frameworks/include/CppUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 361c372

Please sign in to comment.