diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:24:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:24:53 +0400 |
commit | 5a90ea77bc1333efe4e1e54984a080550ed3f707 (patch) | |
tree | 8ba5f94ddcd2c57440197a910305daae5e913554 /source/blender/makesrna/intern/rna_define.c | |
parent | 69e6894b15271884623ea6f56ead06db83acbe99 (diff) |
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 5d68bcbd4d7..651b6fd9c16 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -508,8 +508,8 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna) PropertyRNA *parm, *nextparm; /* - if(srna->flag & STRUCT_RUNTIME) { - if(RNA_struct_py_type_get(srna)) { + if (srna->flag & STRUCT_RUNTIME) { + if (RNA_struct_py_type_get(srna)) { fprintf(stderr, "%s '%s' freed while holding a python reference\n", __func__, srna->identifier); } } */ @@ -2717,7 +2717,8 @@ int rna_parameter_size(PropertyRNA *parm) if (parm->flag & PROP_THICK_WRAP) { StringPropertyRNA *sparm = (StringPropertyRNA*)parm; return sizeof(char) * sparm->maxlength; - } else + } + else return sizeof(char *); case PROP_POINTER: { #ifdef RNA_RUNTIME @@ -2762,7 +2763,7 @@ void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropert if (tot == 0) { *items = MEM_callocN(sizeof(EnumPropertyItem)*8, "RNA_enum_items_add"); } - else if (tot >= 8 && (tot&(tot-1)) == 0){ + else if (tot >= 8 && (tot&(tot-1)) == 0) { /* power of two > 8 */ newitems = MEM_callocN(sizeof(EnumPropertyItem)*tot*2, "RNA_enum_items_add"); memcpy(newitems, *items, sizeof(EnumPropertyItem)*tot); |