diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 16:47:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 16:57:59 +0300 |
commit | ddee0931b8687d01186f1941d483c6b3622d1833 (patch) | |
tree | afc6e71c703bc1bd7a941e7d3f2e4617f0be27e6 /source/blender/makesrna/intern/rna_internal_types.h | |
parent | 3ec6f2172d890972b46c26a72dd30122b697c101 (diff) |
RNA: use bool for boolean RNA types
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r-- | source/blender/makesrna/intern/rna_internal_types.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index d93f3308b2a..3e678b52050 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -69,10 +69,10 @@ typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr); typedef char *(*StructPathFunc)(struct PointerRNA *ptr); typedef int (*PropArrayLengthGetFunc)(struct PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION]); -typedef int (*PropBooleanGetFunc)(struct PointerRNA *ptr); -typedef void (*PropBooleanSetFunc)(struct PointerRNA *ptr, int value); -typedef void (*PropBooleanArrayGetFunc)(struct PointerRNA *ptr, int *values); -typedef void (*PropBooleanArraySetFunc)(struct PointerRNA *ptr, const int *values); +typedef bool (*PropBooleanGetFunc)(struct PointerRNA *ptr); +typedef void (*PropBooleanSetFunc)(struct PointerRNA *ptr, bool value); +typedef void (*PropBooleanArrayGetFunc)(struct PointerRNA *ptr, bool *values); +typedef void (*PropBooleanArraySetFunc)(struct PointerRNA *ptr, const bool *values); typedef int (*PropIntGetFunc)(struct PointerRNA *ptr); typedef void (*PropIntSetFunc)(struct PointerRNA *ptr, int value); typedef void (*PropIntArrayGetFunc)(struct PointerRNA *ptr, int *values); @@ -106,10 +106,10 @@ typedef int (*PropCollectionLookupStringFunc)(struct PointerRNA *ptr, const char typedef int (*PropCollectionAssignIntFunc)(struct PointerRNA *ptr, int key, const struct PointerRNA *assign_ptr); /* extended versions with PropertyRNA argument */ -typedef int (*PropBooleanGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop); -typedef void (*PropBooleanSetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, int value); -typedef void (*PropBooleanArrayGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, int *values); -typedef void (*PropBooleanArraySetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, const int *values); +typedef bool (*PropBooleanGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop); +typedef void (*PropBooleanSetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, bool value); +typedef void (*PropBooleanArrayGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, bool *values); +typedef void (*PropBooleanArraySetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, const bool *values); typedef int (*PropIntGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop); typedef void (*PropIntSetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, int value); typedef void (*PropIntArrayGetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *prop, int *values); @@ -241,8 +241,8 @@ typedef struct BoolPropertyRNA { PropBooleanArrayGetFuncEx getarray_ex; PropBooleanArraySetFuncEx setarray_ex; - int defaultvalue; - const int *defaultarray; + bool defaultvalue; + const bool *defaultarray; } BoolPropertyRNA; typedef struct IntPropertyRNA { |