[cairo] [PATCH 03/51] core: allow NULL parameter for _cairo_path_fixed_is_box()
Enrico Weigelt, metux IT consult
enrico.weigelt at gr13.net
Tue Dec 22 15:22:41 PST 2015
On 22.12.2015 23:11, Bryce Harrington wrote:
> Fwiw, _canonical_box is also used in _cairo_path_fixed_is_stroke_box.
> If a check should be added to _cairo_path_fixed_is_box then for
> consistency it should be added there too.
okay, added it.
> Although from the function name I would not expect passing box=NULL
> would be acceptable. Perhaps the check needs to be further up by
> whatever is calling in here, since it appears to be an internal routine
> anyway?
>
> Frankly, _cairo_path_fixed_is_box() seems odd even aside from this fix,
> since it's checking to see if a path is a rectangle and then has a side
> effect of maybe giving it back as box. Seems like this side-effect
> ought to be done as a separate activity by the caller.
hmm, split them off into _cairo_path_fixed_is_box() and
_cairo_path_fixed_get_box() ?
> In any case, a little more code doc explaining what these routines
> are intended to return would likely help.
Well, if you guys can give me more details on that, I can add it.
--mtx
--
Enrico Weigelt,
metux IT consulting
+49-151-27565287
More information about the cairo
mailing list