diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-11-25 23:39:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-11-25 23:39:14 +0400 |
commit | 63caaa2b12edf0e0a47764156416fac9d43d3664 (patch) | |
tree | 39d9455df141edc2f232240da34514b0468dcc28 /source/blender/windowmanager | |
parent | 5928af11ef97d6d9318d3a06fe32f0d77fc48e9c (diff) |
Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 1f38368399a..507202b9116 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -235,7 +235,7 @@ int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, short c void WM_operator_properties_alloc(struct PointerRNA **ptr, struct IDProperty **properties, const char *opstring); /* used for keymap and macro items */ void WM_operator_properties_sanitize(struct PointerRNA *ptr, const bool no_context); /* make props context sensitive or not */ -int WM_operator_properties_default(struct PointerRNA *ptr, const bool do_update); +bool WM_operator_properties_default(struct PointerRNA *ptr, const bool do_update); void WM_operator_properties_reset(struct wmOperator *op); void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring); void WM_operator_properties_create_ptr(struct PointerRNA *ptr, struct wmOperatorType *ot); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index d60901f1325..2f959c926e0 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -890,7 +890,7 @@ static void wm_region_mouse_co(bContext *C, wmEvent *event) #if 1 /* may want to disable operator remembering previous state for testing */ bool WM_operator_last_properties_init(wmOperator *op) { - bool change = false; + bool changed = false; if (op->type->last_properties) { PropertyRNA *iterprop; @@ -916,7 +916,7 @@ bool WM_operator_last_properties_init(wmOperator *op) idp_dst->flag |= IDP_FLAG_GHOST; IDP_ReplaceInGroup(op->properties, idp_dst); - change = true; + changed = true; } } } @@ -924,7 +924,7 @@ bool WM_operator_last_properties_init(wmOperator *op) RNA_PROP_END; } - return change; + return changed; } bool WM_operator_last_properties_store(wmOperator *op) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 6d106be874d..a5c2f171867 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -863,9 +863,9 @@ void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context) * \note, theres nothing specific to operators here. * this could be made a general function. */ -int WM_operator_properties_default(PointerRNA *ptr, const bool do_update) +bool WM_operator_properties_default(PointerRNA *ptr, const bool do_update) { - int is_change = FALSE; + bool changed = false; RNA_STRUCT_BEGIN (ptr, prop) { switch (RNA_property_type(prop)) { @@ -874,14 +874,14 @@ int WM_operator_properties_default(PointerRNA *ptr, const bool do_update) StructRNA *ptype = RNA_property_pointer_type(ptr, prop); if (ptype != &RNA_Struct) { PointerRNA opptr = RNA_property_pointer_get(ptr, prop); - is_change |= WM_operator_properties_default(&opptr, do_update); + changed |= WM_operator_properties_default(&opptr, do_update); } break; } default: if ((do_update == false) || (RNA_property_is_set(ptr, prop) == FALSE)) { if (RNA_property_reset(ptr, prop, -1)) { - is_change = 1; + changed = true; } } break; @@ -889,7 +889,7 @@ int WM_operator_properties_default(PointerRNA *ptr, const bool do_update) } RNA_STRUCT_END; - return is_change; + return changed; } /* remove all props without PROP_SKIP_SAVE */ |