cairo: Let xr_layout_cell() assume its parameters are nonnull. 20140217030517/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 2 Oct 2013 05:20:12 +0000 (22:20 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 17 Feb 2014 03:21:17 +0000 (19:21 -0800)
This slightly simplifies the logic and all the callers appear to satisfy
this requirement.

src/output/cairo.c

index 6db86317d893447012f2e7cfd16bb069948c893e..7165a50fd675382670721bd2e621d944b699507c 100644 (file)
@@ -868,16 +868,7 @@ xr_layout_cell (struct xr_driver *xr, const struct table_cell *cell,
       cairo_restore (xr->cairo);
     }
 
-  if (width != NULL || height != NULL)
-    {
-      int w, h;
-
-      pango_layout_get_size (font->layout, &w, &h);
-      if (width != NULL)
-        *width = w;
-      if (height != NULL)
-        *height = h;
-    }
+  pango_layout_get_size (font->layout, width, height);
 }
 
 static void