summaryrefslogtreecommitdiff
path: root/objects
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2014-09-07 21:20:08 +0200
committerHans Breuer <hans@breuer.org>2014-09-07 21:20:08 +0200
commitf3ca88cf2ac2cd52e1312c310c3cfbb9f2ce2961 (patch)
tree2086c8a4710c77a17d5231041f04a7e48e6853b3 /objects
parent5797a02e4357b415a997a7f6781d0f62939755f1 (diff)
downloaddia-f3ca88cf2ac2cd52e1312c310c3cfbb9f2ce2961.tar.xz
[warningectomy] missing braces around initializer
n_gon.c: In function '_ngon_make_name': n_gon.c:316:5: warning: missing braces around initializer [-Wmissing-braces] { 3, N_("Triangle"), }, ^ It was easier to change the struct definition.
Diffstat (limited to 'objects')
-rw-r--r--objects/Misc/n_gon.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/objects/Misc/n_gon.c b/objects/Misc/n_gon.c
index 62cb37f5..fe7b4b1a 100644
--- a/objects/Misc/n_gon.c
+++ b/objects/Misc/n_gon.c
@@ -311,7 +311,8 @@ _ngon_make_name (Ngon *ng)
{
static struct {
int v;
- const char *n[3];
+ const char *n0;
+ const char *n1;
} _keys[] = {
{ 3, N_("Triangle"), },
{ 4, N_("Square"), },
@@ -339,9 +340,9 @@ _ngon_make_name (Ngon *ng)
for (i = 0; i < G_N_ELEMENTS(_keys); ++i) {
if (_keys[i].v == ng->num_rays) {
if (ng->kind == NGON_CONVEX)
- name = _keys[i].n[0];
+ name = _keys[i].n0;
else if (ng->kind == NGON_CROSSING)
- name = _keys[i].n[1];
+ name = _keys[i].n1;
}
}
if (!name) {