[cairo] Compilation errors with MSVC after recent changes to 'cairo-path-stroke-traps.c'

Thomas Berg merlin66b at gmail.com
Fri Oct 10 19:05:21 PDT 2014


On Fri, Oct 10, 2014 at 9:37 PM, Chris Wilson <chris at chris-wilson.co.uk>
wrote:
>
> I guess it just wants explicit structure initialisation with each field
> or it may not even like the variable length array?  e.g.
> cairo_point_t t[3] = { {in->x, in->y }, {mid->x, mid->y}, {out->x,
> out->y}};
>
> It'll take a bit of trial and error to remember what msvc accepts.
> -Chris
>

FWIW, I'm using VS2008 and simply adding lengths to the arrays didn't work.
Not sure if it's the most elegant solution, but I got it to compile by
replacing these lines:
cairo_point_t t[] = { in->point, *inpt, *outpt };
cairo_point_t e[] = { in->cw, in->ccw, out->cw, out->ccw };

with these:
cairo_point_t t[3];
cairo_point_t e[4];
t[0] = in->point; t[1] = *inpt; t[2] = *outpt;
e[0] = in->cw; e[1] = in->ccw; e[2] = out->cw; e[3] = out->ccw;

Cheers,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20141011/7a359660/attachment.html>


More information about the cairo mailing list