From a5c35fb27f090bb716a3bb49a69a56be80dff6d3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 28 Jan 2014 03:52:21 +1100 Subject: Code cleanup: use booleans where appropriate --- source/blender/python/intern/bpy_props.c | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'source/blender/python/intern/bpy_props.c') diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 796f6388eb3..7eee0d4a42a 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -197,7 +197,7 @@ static void bpy_prop_update_cb(struct bContext *C, struct PointerRNA *ptr, struc PyObject *args; PyObject *self; PyObject *ret; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); BLI_assert(py_data != NULL); @@ -248,7 +248,7 @@ static int bpy_prop_boolean_get_cb(struct PointerRNA *ptr, struct PropertyRNA *p PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int value; BLI_assert(py_data != NULL); @@ -306,7 +306,7 @@ static void bpy_prop_boolean_set_cb(struct PointerRNA *ptr, struct PropertyRNA * PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); BLI_assert(py_data != NULL); @@ -360,7 +360,7 @@ static void bpy_prop_boolean_array_get_cb(struct PointerRNA *ptr, struct Propert PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int i, len = RNA_property_array_length(ptr, prop); BLI_assert(py_data != NULL); @@ -422,7 +422,7 @@ static void bpy_prop_boolean_array_set_cb(struct PointerRNA *ptr, struct Propert PyObject *py_values; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int len = RNA_property_array_length(ptr, prop); BLI_assert(py_data != NULL); @@ -482,7 +482,7 @@ static int bpy_prop_int_get_cb(struct PointerRNA *ptr, struct PropertyRNA *prop) PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int value; BLI_assert(py_data != NULL); @@ -540,7 +540,7 @@ static void bpy_prop_int_set_cb(struct PointerRNA *ptr, struct PropertyRNA *prop PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); BLI_assert(py_data != NULL); @@ -594,7 +594,7 @@ static void bpy_prop_int_array_get_cb(struct PointerRNA *ptr, struct PropertyRNA PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int i, len = RNA_property_array_length(ptr, prop); BLI_assert(py_data != NULL); @@ -656,7 +656,7 @@ static void bpy_prop_int_array_set_cb(struct PointerRNA *ptr, struct PropertyRNA PyObject *py_values; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int len = RNA_property_array_length(ptr, prop); BLI_assert(py_data != NULL); @@ -716,7 +716,7 @@ static float bpy_prop_float_get_cb(struct PointerRNA *ptr, struct PropertyRNA *p PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); float value; BLI_assert(py_data != NULL); @@ -774,7 +774,7 @@ static void bpy_prop_float_set_cb(struct PointerRNA *ptr, struct PropertyRNA *pr PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); BLI_assert(py_data != NULL); @@ -828,7 +828,7 @@ static void bpy_prop_float_array_get_cb(struct PointerRNA *ptr, struct PropertyR PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int i, len = RNA_property_array_length(ptr, prop); BLI_assert(py_data != NULL); @@ -890,7 +890,7 @@ static void bpy_prop_float_array_set_cb(struct PointerRNA *ptr, struct PropertyR PyObject *py_values; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int len = RNA_property_array_length(ptr, prop); BLI_assert(py_data != NULL); @@ -950,7 +950,7 @@ static void bpy_prop_string_get_cb(struct PointerRNA *ptr, struct PropertyRNA *p PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); BLI_assert(py_data != NULL); @@ -1009,7 +1009,7 @@ static int bpy_prop_string_length_cb(struct PointerRNA *ptr, struct PropertyRNA PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int length; BLI_assert(py_data != NULL); @@ -1071,7 +1071,7 @@ static void bpy_prop_string_set_cb(struct PointerRNA *ptr, struct PropertyRNA *p PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); PyObject *py_value; BLI_assert(py_data != NULL); @@ -1132,7 +1132,7 @@ static int bpy_prop_enum_get_cb(struct PointerRNA *ptr, struct PropertyRNA *prop PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); int value; BLI_assert(py_data != NULL); @@ -1190,7 +1190,7 @@ static void bpy_prop_enum_set_cb(struct PointerRNA *ptr, struct PropertyRNA *pro PyObject *ret; PyGILState_STATE gilstate; bool use_gil; - const int is_write_ok = pyrna_write_check(); + const bool is_write_ok = pyrna_write_check(); BLI_assert(py_data != NULL); -- cgit v1.2.3