diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-20 17:47:15 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-20 17:47:15 +0400 |
commit | 9000db36312cdc514f2ffd967148eef13ed2e67f (patch) | |
tree | c0d418aa0cf9f5497696d69b2a5a0ee134f4d3a0 /source | |
parent | 57e75591b698bc9f51d3ac4482c07e7ad5e6553a (diff) |
RNA: fix compile issue with zero size arrays with old gcc.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index c21685c9add..1fcc8072f9b 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1434,21 +1434,21 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property case PROP_BOOLEAN: { if(!prop->arraydimension) fprintf(f, "\tinline bool %s(void);", rna_safe_id(prop->identifier)); - else + else if(prop->totarraylength) fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier)); break; } case PROP_INT: { if(!prop->arraydimension) fprintf(f, "\tinline int %s(void);", rna_safe_id(prop->identifier)); - else + else if(prop->totarraylength) fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier)); break; } case PROP_FLOAT: { if(!prop->arraydimension) fprintf(f, "\tinline float %s(void);", rna_safe_id(prop->identifier)); - else + else if(prop->totarraylength) fprintf(f, "\tinline Array<float, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier)); break; } @@ -1509,21 +1509,21 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe case PROP_BOOLEAN: { if(!prop->arraydimension) fprintf(f, "\tBOOLEAN_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier)); - else + else if(prop->totarraylength) fprintf(f, "\tBOOLEAN_ARRAY_PROPERTY(%s, %u, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier)); break; } case PROP_INT: { if(!prop->arraydimension) fprintf(f, "\tINT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier)); - else + else if(prop->totarraylength) fprintf(f, "\tINT_ARRAY_PROPERTY(%s, %u, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier)); break; } case PROP_FLOAT: { if(!prop->arraydimension) fprintf(f, "\tFLOAT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier)); - else + else if(prop->totarraylength) fprintf(f, "\tFLOAT_ARRAY_PROPERTY(%s, %u, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier)); break; } |