Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/geom.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ double Interpolate( double a, double x, double b, double y)

#endif

#define Swap(a,b) if (1) { TESSvertex *t = a; a = b; b = t; } else
#define Swap(a,b) do { TESSvertex *t = a; a = b; b = t; } while (0)

void tesedgeIntersect( TESSvertex *o1, TESSvertex *d1,
TESSvertex *o2, TESSvertex *d2,
Expand Down
2 changes: 2 additions & 0 deletions Source/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ int tessMeshMergeConvexFaces( TESSmesh *mesh, int maxVertsPerFace )

void tessMeshFlipEdge( TESSmesh *mesh, TESShalfEdge *edge )
{
TESS_NOTUSED(mesh);

TESShalfEdge *a0 = edge;
TESShalfEdge *a1 = a0->Lnext;
TESShalfEdge *a2 = a1->Lnext;
Expand Down
2 changes: 1 addition & 1 deletion Source/priorityq.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ void pqDeletePriorityQ( TESSalloc* alloc, PriorityQ *pq )

#define LT(x,y) (! LEQ(y,x))
#define GT(x,y) (! LEQ(x,y))
#define Swap(a,b) if(1){PQkey *tmp = *a; *a = *b; *b = tmp;}else
#define Swap(a,b) do { PQkey *tmp = *a; *a = *b; *b = tmp; } while (0)

/* really tessPqSortInit */
int pqInit( TESSalloc* alloc, PriorityQ *pq )
Expand Down