Skip to content

Commit 39b8faf

Browse files
committed
Remove redundant conditions for curves.
The `(do_)clip` booleans already end with `&& !has_curves`, so there's no need to add this condition again when the booleans are used.
1 parent 9f9aa5b commit 39b8faf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_backend_agg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ RendererAgg::draw_path(GCAgg &gc, PathIterator &path, agg::trans_affine &trans,
481481

482482
transformed_path_t tpath(path, trans);
483483
nan_removed_t nan_removed(tpath, true, path.has_curves());
484-
clipped_t clipped(nan_removed, clip && !path.has_curves(), width, height);
484+
clipped_t clipped(nan_removed, clip, width, height);
485485
snapped_t snapped(clipped, gc.snap_mode, path.total_vertices(), snapping_linewidth);
486486
simplify_t simplified(snapped, simplify, path.simplify_threshold());
487487
curve_t curve(simplified);
@@ -1006,7 +1006,7 @@ inline void RendererAgg::_draw_path_collection_generic(GCAgg &gc,
10061006

10071007
transformed_path_t tpath(path, trans);
10081008
nan_removed_t nan_removed(tpath, true, has_curves);
1009-
clipped_t clipped(nan_removed, do_clip && !has_curves, width, height);
1009+
clipped_t clipped(nan_removed, do_clip, width, height);
10101010
snapped_t snapped(
10111011
clipped, gc.snap_mode, path.total_vertices(), points_to_pixels(gc.linewidth));
10121012
if (has_curves) {

0 commit comments

Comments
 (0)