aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2022-02-01 13:58:27 +0100
committerAndre Weissflog <floooh@gmail.com>2022-02-01 13:58:27 +0100
commite51d4e12ac6ad6fb435a4f4bae5ae01ac4c3fed0 (patch)
tree3b82b94fc236b36f1d331e08e4fef88dd070c068
parent89ba72f4f0da1802a2146bf799900bf803944645 (diff)
sokol_shape.h: fix missing braces warning, instead of suppressing the warning
-rw-r--r--util/sokol_shape.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/sokol_shape.h b/util/sokol_shape.h
index bdbfd486..419181fa 100644
--- a/util/sokol_shape.h
+++ b/util/sokol_shape.h
@@ -856,7 +856,7 @@ SOKOL_API_IMPL sshape_mat4_t sshape_mat4_transpose(const float m[16]) {
SOKOL_API_IMPL sshape_sizes_t sshape_plane_sizes(uint32_t tiles) {
SOKOL_ASSERT(tiles >= 1);
- sshape_sizes_t res = { 0 };
+ sshape_sizes_t res = { {0} };
res.vertices.num = _sshape_plane_num_vertices(tiles);
res.indices.num = _sshape_plane_num_indices(tiles);
res.vertices.size = res.vertices.num * sizeof(sshape_vertex_t);
@@ -866,7 +866,7 @@ SOKOL_API_IMPL sshape_sizes_t sshape_plane_sizes(uint32_t tiles) {
SOKOL_API_IMPL sshape_sizes_t sshape_box_sizes(uint32_t tiles) {
SOKOL_ASSERT(tiles >= 1);
- sshape_sizes_t res = { 0 };
+ sshape_sizes_t res = { {0} };
res.vertices.num = _sshape_box_num_vertices(tiles);
res.indices.num = _sshape_box_num_indices(tiles);
res.vertices.size = res.vertices.num * sizeof(sshape_vertex_t);
@@ -876,7 +876,7 @@ SOKOL_API_IMPL sshape_sizes_t sshape_box_sizes(uint32_t tiles) {
SOKOL_API_IMPL sshape_sizes_t sshape_sphere_sizes(uint32_t slices, uint32_t stacks) {
SOKOL_ASSERT((slices >= 3) && (stacks >= 2));
- sshape_sizes_t res = { 0 };
+ sshape_sizes_t res = { {0} };
res.vertices.num = _sshape_sphere_num_vertices(slices, stacks);
res.indices.num = _sshape_sphere_num_indices(slices, stacks);
res.vertices.size = res.vertices.num * sizeof(sshape_vertex_t);
@@ -886,7 +886,7 @@ SOKOL_API_IMPL sshape_sizes_t sshape_sphere_sizes(uint32_t slices, uint32_t stac
SOKOL_API_IMPL sshape_sizes_t sshape_cylinder_sizes(uint32_t slices, uint32_t stacks) {
SOKOL_ASSERT((slices >= 3) && (stacks >= 1));
- sshape_sizes_t res = { 0 };
+ sshape_sizes_t res = { {0} };
res.vertices.num = _sshape_cylinder_num_vertices(slices, stacks);
res.indices.num = _sshape_cylinder_num_indices(slices, stacks);
res.vertices.size = res.vertices.num * sizeof(sshape_vertex_t);
@@ -896,7 +896,7 @@ SOKOL_API_IMPL sshape_sizes_t sshape_cylinder_sizes(uint32_t slices, uint32_t st
SOKOL_API_IMPL sshape_sizes_t sshape_torus_sizes(uint32_t sides, uint32_t rings) {
SOKOL_ASSERT((sides >= 3) && (rings >= 3));
- sshape_sizes_t res = { 0 };
+ sshape_sizes_t res = { {0} };
res.vertices.num = _sshape_torus_num_vertices(sides, rings);
res.indices.num = _sshape_torus_num_indices(sides, rings);
res.vertices.size = res.vertices.num * sizeof(sshape_vertex_t);