diff --git a/src/hb-raster-svg-clip.cc b/src/hb-raster-svg-clip.cc index 04eb986b5..edae7504e 100644 --- a/src/hb-raster-svg-clip.cc +++ b/src/hb-raster-svg-clip.cc @@ -83,8 +83,7 @@ svg_clip_append_shape (hb_svg_clip_collect_context_t *ctx, clip_shape.has_transform = true; clip_shape.transform = transform; } - ctx->defs->clip_shapes.push (clip_shape); - if (likely (!ctx->defs->clip_shapes.in_error ())) + if (likely (ctx->defs->clip_shapes.push_or_fail (clip_shape))) ctx->clip->shape_count++; else if (ctx->had_alloc_failure) *ctx->had_alloc_failure = true; diff --git a/src/hb-raster-svg-fill.cc b/src/hb-raster-svg-fill.cc index 175c48f9c..98991ec50 100644 --- a/src/hb-raster-svg-fill.cc +++ b/src/hb-raster-svg-fill.cc @@ -147,8 +147,7 @@ hb_raster_svg_emit_fill (const hb_svg_fill_context_t *ctx, if (unlikely (!node.visit ((uintptr_t) cur))) break; - chain.push (cur); - if (unlikely (chain.in_error ())) + if (unlikely (!chain.push_or_fail (cur))) { if (fallback_paint.len) hb_raster_svg_emit_fill (ctx, fallback_paint, fill_opacity, object_bbox, current_color); diff --git a/src/hb-raster-svg-gradient.cc b/src/hb-raster-svg-gradient.cc index 36e5be8dc..cf9e51df1 100644 --- a/src/hb-raster-svg-gradient.cc +++ b/src/hb-raster-svg-gradient.cc @@ -90,8 +90,7 @@ svg_parse_gradient_stop (hb_svg_xml_parser_t &parser, stop.offset = offset; stop.color = color; stop.is_current_color = is_current_color; - grad.stops.push (stop); - return !grad.stops.in_error (); + return grad.stops.push_or_fail (stop); } static void