From a9392c0cbb44111c2d5424257aafdebf2de8604c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 25 Jan 2023 14:54:52 -0700 Subject: [PATCH] [cairo] Use hb_swap() --- src/hb-cairo-utils.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/hb-cairo-utils.cc b/src/hb-cairo-utils.cc index 4bf45302f..0eb3b0562 100644 --- a/src/hb-cairo-utils.cc +++ b/src/hb-cairo-utils.cc @@ -594,16 +594,10 @@ _hb_cairo_add_sweep_gradient_patches (hb_color_stop_t *stops, /* handle directions */ if (end_angle < start_angle) { - float angle = end_angle; - end_angle = start_angle; - start_angle = angle; + hb_swap (start_angle, end_angle); for (unsigned i = 0; i < n_stops - 1 - i; i++) - { - hb_color_stop_t stop = stops[i]; - stops[i] = stops[n_stops - 1 - i]; - stops[n_stops - 1 - i] = stop; - } + hb_swap (stops[i], stops[n_stops - 1 - i]); } if (n_stops > PREALLOCATED_COLOR_STOPS)