* src/base/ftstroke.c: Simplify.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
diff --git a/ChangeLog b/ChangeLog
index 96a4bfd..f620bed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftstroke.c: Simplify.
+
2015-03-04 Werner Lemberg <wl@gnu.org>
[truetype] Some fixes and code refactoring in `ttgxvar.c'.
diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c
index d7f9283..434d0d8 100644
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -1220,11 +1220,8 @@
goto Exit;
/* when we turn to the right, the inside side is 0 */
- inside_side = 0;
-
/* otherwise, the inside side is 1 */
- if ( turn < 0 )
- inside_side = 1;
+ inside_side = ( turn < 0 );
/* process the inside side */
error = ft_stroker_inside( stroker, inside_side, line_length );
@@ -1232,7 +1229,7 @@
goto Exit;
/* process the outside side */
- error = ft_stroker_outside( stroker, 1 - inside_side, line_length );
+ error = ft_stroker_outside( stroker, !inside_side, line_length );
Exit:
return error;
@@ -1941,11 +1938,8 @@
if ( turn != 0 )
{
/* when we turn to the right, the inside side is 0 */
- inside_side = 0;
-
/* otherwise, the inside side is 1 */
- if ( turn < 0 )
- inside_side = 1;
+ inside_side = ( turn < 0 );
error = ft_stroker_inside( stroker,
inside_side,
@@ -1955,7 +1949,7 @@
/* process the outside side */
error = ft_stroker_outside( stroker,
- 1 - inside_side,
+ !inside_side,
stroker->subpath_line_length );
if ( error )
goto Exit;