summaryrefslogtreecommitdiff
path: root/src/cairo-path.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-04-09 17:24:18 -0700
committerCarl Worth <cworth@cworth.org>2007-04-10 10:14:48 -0700
commita7d8e52cc4be2376429f567abc2be853da7d5fbc (patch)
tree73c9f80423de66b80a51e1bdf8e68809e19a8005 /src/cairo-path.c
parent7c97696af98a6dab9e0c5cdc72ff08c19892c95f (diff)
downloadcairo-a7d8e52cc4be2376429f567abc2be853da7d5fbc.tar.gz
Cleanup multi-line if condition
The standard idiom of assigning to a local status variable looks much, much nicer here.
Diffstat (limited to 'src/cairo-path.c')
-rw-r--r--src/cairo-path.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/cairo-path.c b/src/cairo-path.c
index 3add10769..cf2dd4d92 100644
--- a/src/cairo-path.c
+++ b/src/cairo-path.c
@@ -136,6 +136,7 @@ _cairo_path_count (cairo_path_t *path,
double tolerance,
cairo_bool_t flatten)
{
+ cairo_status_t status;
cpc_t cpc;
cpc.count = 0;
@@ -143,15 +144,16 @@ _cairo_path_count (cairo_path_t *path,
cpc.current_point.x = 0;
cpc.current_point.y = 0;
- if (_cairo_path_fixed_interpret (path_fixed,
- CAIRO_DIRECTION_FORWARD,
- _cpc_move_to,
- _cpc_line_to,
- flatten ?
- _cpc_curve_to_flatten :
- _cpc_curve_to,
- _cpc_close_path,
- &cpc) != CAIRO_STATUS_SUCCESS)
+ status = _cairo_path_fixed_interpret (path_fixed,
+ CAIRO_DIRECTION_FORWARD,
+ _cpc_move_to,
+ _cpc_line_to,
+ flatten ?
+ _cpc_curve_to_flatten :
+ _cpc_curve_to,
+ _cpc_close_path,
+ &cpc);
+ if (status)
return 0;
return cpc.count;