[cairo-commit] cairo/src cairo-gstate.c,1.157,1.158
Carl Worth
commit at pdx.freedesktop.org
Fri Aug 5 21:33:45 PDT 2005
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv6314/src
Modified Files:
cairo-gstate.c
Log Message:
2005-08-05 Carl Worth <cworth at cworth.org>
* src/cairo-gstate.c: (_cairo_gstate_set_font_face): Simplify the
implementation by taking advantage of the fact that destroy and
reference are safe for NULL, and that reference returns its
argument.
Index: cairo-gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-gstate.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- cairo-gstate.c 6 Aug 2005 04:27:21 -0000 1.157
+++ cairo-gstate.c 6 Aug 2005 04:33:42 -0000 1.158
@@ -1653,11 +1653,8 @@
return font_face->status;
if (font_face != gstate->font_face) {
- if (gstate->font_face)
- cairo_font_face_destroy (gstate->font_face);
- gstate->font_face = font_face;
- if (gstate->font_face)
- cairo_font_face_reference (gstate->font_face);
+ cairo_font_face_destroy (gstate->font_face);
+ gstate->font_face = cairo_font_face_reference (font_face);
}
_cairo_gstate_unset_scaled_font (gstate);
More information about the cairo-commit
mailing list