diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-27 20:52:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-27 21:00:04 +0400 |
commit | a5c35fb27f090bb716a3bb49a69a56be80dff6d3 (patch) | |
tree | c2486c0781d2135c00ee58c78c042ba9d4f87b97 /source/blender/editors/interface/interface_handlers.c | |
parent | 60287e23b53a273aae56c42502278991dbeee9e7 (diff) |
Code cleanup: use booleans where appropriate
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 62e1c4ad60b..1f06358eb78 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1848,7 +1848,7 @@ static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, strCursorJump const char *str = data->str; const int len = strlen(str); const int pos_prev = but->pos; - const int has_sel = (but->selend - but->selsta) > 0; + const bool has_sel = (but->selend - but->selsta) > 0; ui_check_but(but); @@ -5207,7 +5207,7 @@ static uiBlock *menu_change_shortcut(bContext *C, ARegion *ar, void *arg) uiLayout *layout; uiStyle *style = UI_GetStyleDraw(); IDProperty *prop = (but->opptr) ? but->opptr->data : NULL; - int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km); + int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, true, &km); kmi = WM_keymap_item_find_id(km, kmi_id); @@ -5286,7 +5286,7 @@ static void remove_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2)) wmKeyMap *km; wmKeyMapItem *kmi; IDProperty *prop = (but->opptr) ? but->opptr->data : NULL; - int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km); + int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, true, &km); kmi = WM_keymap_item_find_id(km, kmi_id); WM_keymap_remove_item(km, kmi); @@ -5522,7 +5522,7 @@ static bool ui_but_menu(bContext *C, uiBut *but) int w = uiLayoutGetWidth(layout); wmKeyMap *km; wmKeyMapItem *kmi = NULL; - int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km); + int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, true, &km); if (kmi_id) kmi = WM_keymap_item_find_id(km, kmi_id); |