From 393e71d9039db8cb16435c16252e890361ec5988 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Sat, 3 Sep 2016 18:58:22 +0300 Subject: Avoid == true / == false. (bzr r15100.1.11) --- src/livarot/Shape.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/livarot/Shape.cpp') diff --git a/src/livarot/Shape.cpp b/src/livarot/Shape.cpp index 0bb3390e8..ea6180bee 100644 --- a/src/livarot/Shape.cpp +++ b/src/livarot/Shape.cpp @@ -1688,8 +1688,7 @@ Shape::CmpToVert (Geom::Point ax, Geom::Point bx,bool as,bool bs) if (si > 0.000001) tstSi = 1; if (si < -0.000001) tstSi = -1; if ( tstSi == 0 ) { - if ( as == true && bs == false ) return -1; - if ( as == false && bs == true ) return 1; + if ( (as && !bs) || (!as && bs) ) return -1; } return tstSi; } -- cgit v1.2.3 From 160b9ef68f49c39034b6f9e1695e9a8c9e80cf6a Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Thu, 29 Sep 2016 20:30:52 +0300 Subject: Fix a regression introduced by the refactoring. Thanks to Mc for noticing it here: https://code.launchpad.net/~shlomif-gmail/inkscape/trunk-refactoring/+merge/307193 (bzr r15100.1.24) --- src/livarot/Shape.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/livarot/Shape.cpp') diff --git a/src/livarot/Shape.cpp b/src/livarot/Shape.cpp index ea6180bee..33b383947 100644 --- a/src/livarot/Shape.cpp +++ b/src/livarot/Shape.cpp @@ -1688,7 +1688,8 @@ Shape::CmpToVert (Geom::Point ax, Geom::Point bx,bool as,bool bs) if (si > 0.000001) tstSi = 1; if (si < -0.000001) tstSi = -1; if ( tstSi == 0 ) { - if ( (as && !bs) || (!as && bs) ) return -1; + if ( as && !bs ) return -1; + if ( !as && bs ) return 1; } return tstSi; } -- cgit v1.2.3