diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-23 14:42:47 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-30 17:52:12 +0000 |
commit | 2836be6f7565684e86b3cc8a3d2db4ba690b3718 (patch) | |
tree | 799041252696faef5deed8d0de520fce42fa39e7 | |
parent | 13ba43eb8ffc3bb6c8881d91824102a8df86d928 (diff) |
Cleanup 'status && status != UNSUPPORTED'
Replace instances of 'status && status != UNSUPPORTED' with the more
readable _cairo_status_is_error().
-rw-r--r-- | src/cairo-analysis-surface.c | 14 | ||||
-rw-r--r-- | src/cairo-clip.c | 4 | ||||
-rw-r--r-- | src/cairo-pdf-surface.c | 8 | ||||
-rw-r--r-- | src/cairo-ps-surface.c | 4 | ||||
-rw-r--r-- | src/cairo-scaled-font-subsets.c | 4 |
5 files changed, 17 insertions, 17 deletions
diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c index 940c8a89..4337e92c 100644 --- a/src/cairo-analysis-surface.c +++ b/src/cairo-analysis-surface.c @@ -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)) { diff --git a/src/cairo-clip.c b/src/cairo-clip.c index 8a0d4db1..93bc151c 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -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; } } diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 0154acd1..4cad4701 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -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; } diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index 3d7afb62..9e55e9ff 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -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); diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c index 066f6378..815c4d8b 100644 --- a/src/cairo-scaled-font-subsets.c +++ b/src/cairo-scaled-font-subsets.c @@ -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 && |