In addition to what Griff said about fixing your declaration so you're passing a pointer to int rather than a pointer to pointer to int I've got a question back for you...
Your function doesn't return anything. Yet you're using an out parameter (some what incorrectly)... Why not return the number of vertices and then you'll have one less thing to mess around with and get wrong? Then your code could become something like...
static int FilterAContour(gpc_vertex * Poly, int numVertices )
{
if(numVertices <=1)
{
return 1;
}
else if(numVertices==2)
{
return ((Poly[0].x==Poly[1].x) && (Poly[0].y==Poly[1].y) ) ? 1 : 2;
}
else
{
return -1;
}
}
Now I know there's probably more to the code that what you've presented here but just in that little chunk it's cleared up stuff no end. Stick in a poly equality function (equal rights for parrots? Outrageous!) and it becomes even simpler:
static int EqualXandY( const gpc_vertex *p1, const gpc_vertex *p2 )
{
return (p1.x==p2.x) && (p1.y==p2.y);
}
static int FilterAContour(gpc_vertex * Poly, int numVertices )
{
if(numVertices <=1)
{
return 1;
}
else if(numVertices==2)
{
return ( EqualXandY( &Poly[ 0 ], &Poly[ 1 ] ) ? 1 : 2;
}
else
{
return -1;
}
}
I'm not sure if this is exactly correct (I haven't compiled it) but to my self taught eye it looks a lot easier to read!
Edit: Added in the final else to stop some compilers (correctly) whinging about some control paths not returning a value.