diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-31 18:39:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-31 18:39:37 +0300 |
commit | 3367ef8b6591b62b1b76f07fccb310485f6d45c7 (patch) | |
tree | cad394807148ecbd211b4deb1427e15eb9e34001 /source/blender/makesrna/intern | |
parent | 4c80d13e54f5421774a992c1f1ff1c1ae832c2fc (diff) |
initialize structs to zero rather then using memset().
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 6cdb842fbc2..fe82c6e06e1 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -101,11 +101,10 @@ void RNA_main_pointer_create(struct Main *main, PointerRNA *r_ptr) void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr) { - PointerRNA tmp; StructRNA *type, *idtype= NULL; if(id) { - memset(&tmp, 0, sizeof(tmp)); + PointerRNA tmp= {{0}}; tmp.data= id; idtype= rna_ID_refine(&tmp); @@ -126,11 +125,10 @@ void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr) void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr) { - PointerRNA tmp; StructRNA *idtype= NULL; if(id) { - memset(&tmp, 0, sizeof(tmp)); + PointerRNA tmp= {{0}}; tmp.data= id; idtype= rna_ID_refine(&tmp); } @@ -1974,9 +1972,7 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop) return RNA_property_pointer_get(ptr, prop); } else { - PointerRNA result; - - memset(&result, 0, sizeof(result)); + PointerRNA result= {{0}}; return result; } } |