commit 57db410e881295c3fbfa1846ece9ce0a5364067a
parent 73e8141584499c43109af684e56e1696e2274421
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Mon, 9 Oct 2017 16:00:24 +0200
Use unsigned instead of int for a few counts.
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/s3dut_cylinder.c b/src/s3dut_cylinder.c
@@ -175,7 +175,7 @@ s3dut_create_cylinder
size_t ntris;
const int close_bottom = close_ends & S3DUT_END_BOTTOM;
const int close_top = close_ends & S3DUT_END_TOP;
- const int nb_closed_ends = (close_bottom ? 1 : 0) + (close_top ? 1 : 0);
+ const unsigned nb_closed_ends = (close_bottom ? 1 : 0) + (close_top ? 1 : 0);
res_T res = RES_OK;
if(radius <= 0 || height <= 0 || nslices < 3 || nstacks < 1 || !mesh) {
@@ -230,7 +230,7 @@ s3dut_create_thick_cylinder
size_t id_offset;
const int close_bottom = close_ends & S3DUT_END_BOTTOM;
const int close_top = close_ends & S3DUT_END_TOP;
- const int nb_closed_ends = (close_bottom ? 1 : 0) + (close_top ? 1 : 0);
+ const unsigned nb_closed_ends = (close_bottom ? 1 : 0) + (close_top ? 1 : 0);
res_T res = RES_OK;
if(radius <= thickness || height <= 0 || thickness <= 0
@@ -252,8 +252,8 @@ s3dut_create_thick_cylinder
coords_out = darray_double_data_get(&cylinder->coords);
ids_out = darray_size_t_data_get(&cylinder->ids);
/* External cylinder */
- coords_in = setup_cylinder_coords(coords_out, radius, -0.5*height, +0.5*height,
- nslices, nstacks, close_bottom, close_top);
+ coords_in = setup_cylinder_coords(coords_out, radius, -0.5*height,
+ +0.5*height, nslices, nstacks, close_bottom, close_top);
ids_in = setup_cylinder_indices
(ids_out, 0, nslices, nstacks, close_bottom, close_top, 1);
/* Internal cylinder */