commit 361bb72404f0e5b358bdb9c8fcb7a5a3f2323a7a
parent 790c892d8281b91d1b8ae7aaf184d26c2e63920f
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Fri, 9 Sep 2022 10:22:40 +0200
Fix arg constness
Diffstat:
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/scad.h b/src/scad.h
@@ -257,7 +257,7 @@ scad_geometries_partition_one
SCAD_API res_T
scad_geometry_boundary
(const char* name, /* Can be NULL */
- struct scad_geometry* geom,
+ const struct scad_geometry* geom,
struct scad_geometry** out_boundary);
/* copy the geometry `geom'. */
diff --git a/src/scad_geometry.c b/src/scad_geometry.c
@@ -1090,16 +1090,17 @@ scad_geometries_partition
res_T
scad_geometry_boundary
(const char* name,
- struct scad_geometry* geom,
+ const struct scad_geometry* in_geom,
struct scad_geometry** out_geometry)
{
int* tagout = NULL;
size_t tagoutn, sz;
int* data;
int ierr = 0;
+ struct scad_geometry* geom = NULL;
res_T res = RES_OK;
- if(!geom || !out_geometry) {
+ if(!in_geom || !out_geometry) {
res = RES_BAD_ARG;
goto error;
}
@@ -1108,8 +1109,8 @@ scad_geometry_boundary
ERR(scad_synchronize());
}
- sz = geom->gmsh_dimTags_n;
- data = geom->gmsh_dimTags;
+ sz = in_geom->gmsh_dimTags_n;
+ data = in_geom->gmsh_dimTags;
gmshModelGetBoundary(data, sz, &tagout, &tagoutn, 1, 0, 0, &ierr);
ERR(gmsh_err_to_res_T(ierr));