mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-21 15:40:33 +01:00
Cleanup 'status && status != UNSUPPORTED'
Replace instances of 'status && status != UNSUPPORTED' with the more readable _cairo_status_is_error().
This commit is contained in:
parent
13ba43eb8f
commit
2836be6f75
5 changed files with 17 additions and 17 deletions
|
|
@ -116,7 +116,7 @@ _analyze_meta_surface_pattern (cairo_analysis_surface_t *surface,
|
|||
old_height = surface->height;
|
||||
old_clip = surface->current_clip;
|
||||
status = _cairo_surface_get_extents (surface_pattern->surface, &meta_extents);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
surface->width = meta_extents.width;
|
||||
|
|
@ -339,7 +339,7 @@ _cairo_analysis_surface_paint (void *abstract_surface,
|
|||
backend_status = _analyze_meta_surface_pattern (surface, source);
|
||||
|
||||
status = _cairo_surface_get_extents (&surface->base, &extents);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
if (_cairo_operator_bounded_by_source (op)) {
|
||||
|
|
@ -406,7 +406,7 @@ _cairo_analysis_surface_mask (void *abstract_surface,
|
|||
}
|
||||
|
||||
status = _cairo_surface_get_extents (&surface->base, &extents);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
if (_cairo_operator_bounded_by_source (op)) {
|
||||
|
|
@ -465,7 +465,7 @@ _cairo_analysis_surface_stroke (void *abstract_surface,
|
|||
backend_status = _analyze_meta_surface_pattern (surface, source);
|
||||
|
||||
status = _cairo_surface_get_extents (&surface->base, &extents);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
if (_cairo_operator_bounded_by_source (op)) {
|
||||
|
|
@ -534,7 +534,7 @@ _cairo_analysis_surface_fill (void *abstract_surface,
|
|||
backend_status = _analyze_meta_surface_pattern (surface, source);
|
||||
|
||||
status = _cairo_surface_get_extents (&surface->base, &extents);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
if (_cairo_operator_bounded_by_source (op)) {
|
||||
|
|
@ -612,7 +612,7 @@ _cairo_analysis_surface_show_glyphs (void *abstract_surface,
|
|||
backend_status = _analyze_meta_surface_pattern (surface, source);
|
||||
|
||||
status = _cairo_surface_get_extents (&surface->base, &extents);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
if (_cairo_operator_bounded_by_source (op)) {
|
||||
|
|
@ -695,7 +695,7 @@ _cairo_analysis_surface_show_text_glyphs (void *abstract_surface,
|
|||
backend_status = _analyze_meta_surface_pattern (surface, source);
|
||||
|
||||
status = _cairo_surface_get_extents (&surface->base, &extents);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
if (_cairo_operator_bounded_by_source (op)) {
|
||||
|
|
|
|||
|
|
@ -656,7 +656,7 @@ _cairo_clip_path_reapply_clip_path (cairo_clip_t *clip,
|
|||
|
||||
if (clip_path->prev) {
|
||||
status = _cairo_clip_path_reapply_clip_path (clip, clip_path->prev);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -709,7 +709,7 @@ _cairo_clip_init_deep_copy (cairo_clip_t *clip,
|
|||
|
||||
if (other->path) {
|
||||
status = _cairo_clip_path_reapply_clip_path (clip, other->path);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
goto BAIL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3027,7 +3027,7 @@ _cairo_pdf_surface_emit_cff_font (cairo_pdf_surface_t *surface,
|
|||
status = _cairo_pdf_surface_emit_to_unicode_stream (surface,
|
||||
font_subset, TRUE,
|
||||
&to_unicode_stream);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
descriptor = _cairo_pdf_surface_new_object (surface);
|
||||
|
|
@ -3199,7 +3199,7 @@ _cairo_pdf_surface_emit_type1_font (cairo_pdf_surface_t *surface,
|
|||
status = _cairo_pdf_surface_emit_to_unicode_stream (surface,
|
||||
font_subset, FALSE,
|
||||
&to_unicode_stream);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
descriptor = _cairo_pdf_surface_new_object (surface);
|
||||
|
|
@ -3356,7 +3356,7 @@ _cairo_pdf_surface_emit_truetype_font_subset (cairo_pdf_surface_t *surface,
|
|||
status = _cairo_pdf_surface_emit_to_unicode_stream (surface,
|
||||
font_subset, TRUE,
|
||||
&to_unicode_stream);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED) {
|
||||
if (_cairo_status_is_error (status)) {
|
||||
_cairo_truetype_subset_fini (&subset);
|
||||
return status;
|
||||
}
|
||||
|
|
@ -3658,7 +3658,7 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t *surface,
|
|||
status = _cairo_pdf_surface_emit_to_unicode_stream (surface,
|
||||
font_subset, FALSE,
|
||||
&to_unicode_stream);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED) {
|
||||
if (_cairo_status_is_error (status)) {
|
||||
free (widths);
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ _cairo_ps_surface_emit_unscaled_font_subset (cairo_scaled_font_subset_t *font_su
|
|||
|
||||
|
||||
status = _cairo_scaled_font_subset_create_glyph_names (font_subset);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
#if CAIRO_HAS_FT_FONT
|
||||
|
|
@ -606,7 +606,7 @@ _cairo_ps_surface_emit_scaled_font_subset (cairo_scaled_font_subset_t *font_subs
|
|||
cairo_status_t status;
|
||||
|
||||
status = _cairo_scaled_font_subset_create_glyph_names (font_subset);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
status = _cairo_ps_surface_emit_type3_font_subset (surface, font_subset);
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ _cairo_sub_font_glyph_lookup_unicode (cairo_sub_font_glyph_t *sub_font_glyph,
|
|||
status = _cairo_truetype_index_to_ucs4 (scaled_font,
|
||||
scaled_font_glyph_index,
|
||||
&unicode);
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
if (unicode == (uint32_t)-1 && scaled_font->backend->index_to_ucs4) {
|
||||
|
|
@ -722,7 +722,7 @@ _cairo_scaled_font_subsets_map_glyph (cairo_scaled_font_subsets_t *subsets,
|
|||
&scaled_glyph);
|
||||
_cairo_scaled_font_thaw_cache (scaled_font);
|
||||
}
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
if (_cairo_status_is_error (status))
|
||||
return status;
|
||||
|
||||
if (status == CAIRO_STATUS_SUCCESS &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue