commit 498042b0d936cfe0373fd0d53071341d01cd01c2
parent fd26411c69c9b68111b6d68893d0b048c14c8419
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 15 Jun 2020 16:52:30 +0200
Fix the compilation of sg2d_geometry_add in debug
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/sg2d_geometry.c b/src/sg2d_geometry.c
@@ -426,12 +426,12 @@ sg2d_geometry_add
}
#ifndef NDEBUG
{
- double edge[3];
- struct vertex* vertices = darray_vertex_cdata_get(&geom->unique_vertices);
- d3_sub(edge, vertices[tmp.vertex_ids[0]], vertices[tmp.vertex_ids[1]]);
+ double edge[2];
+ const struct vertex* vertices = darray_vertex_cdata_get(&geom->unique_vertices);
+ d2_sub(edge, vertices[tmp.vertex_ids[0]].coord, vertices[tmp.vertex_ids[1]].coord);
/* As vertices are deduplicated, an edge cannot be nul if vertices have
* distinct indices */
- ASSERT(d3_len(edge) != 0);
+ ASSERT(d2_len(edge) != 0);
}
#endif
/* Get properties */