diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-24 03:05:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-24 03:05:09 +0300 |
commit | 4fc1510dd8f2cac70ac4e0e813c82a88fe462e15 (patch) | |
tree | ca4e3c421ed457ac655f86e9dad435848b6740c0 | |
parent | 23c276832b1bb43712756c0ea3af954557ab05e7 (diff) |
Cleanup: use return argument prefix
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 12 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 17 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 12 |
3 files changed, 25 insertions, 16 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 9aad340d2fb..a623f5cfb9c 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1020,12 +1020,18 @@ bool UI_context_copy_to_selected_list( /* Helpers for Operators */ uiBut *UI_context_active_but_get(const struct bContext *C); -void UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index); +void UI_context_active_but_prop_get( + const struct bContext *C, + struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index); void UI_context_active_but_prop_handle(struct bContext *C); struct wmOperator *UI_context_active_operator_get(const struct bContext *C); void UI_context_update_anim_flag(const struct bContext *C); -void UI_context_active_but_prop_get_filebrowser(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, bool *r_is_undo); -void UI_context_active_but_prop_get_templateID(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop); +void UI_context_active_but_prop_get_filebrowser( + const struct bContext *C, + struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, bool *r_is_undo); +void UI_context_active_but_prop_get_templateID( + struct bContext *C, + struct PointerRNA *r_ptr, struct PropertyRNA **r_prop); /* Styled text draw */ void UI_fontstyle_set(const struct uiFontStyle *fs); diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 133487e1846..dd823891290 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -8013,20 +8013,21 @@ uiBut *UI_context_active_but_get(const struct bContext *C) } /* helper function for insert keyframe, reset to default, etc operators */ -void UI_context_active_but_prop_get(const bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index) +void UI_context_active_but_prop_get( + const bContext *C, + struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index) { uiBut *activebut = ui_context_rna_button_active(C); - memset(ptr, 0, sizeof(*ptr)); - if (activebut && activebut->rnapoin.data) { - *ptr = activebut->rnapoin; - *prop = activebut->rnaprop; - *index = activebut->rnaindex; + *r_ptr = activebut->rnapoin; + *r_prop = activebut->rnaprop; + *r_index = activebut->rnaindex; } else { - *prop = NULL; - *index = 0; + memset(r_ptr, 0, sizeof(*r_ptr)); + *r_prop = NULL; + *r_index = 0; } } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 9f0c4b16523..7f276bcc634 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -232,15 +232,17 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem) /* This is for browsing and editing the ID-blocks used */ /* for new/open operators */ -void UI_context_active_but_prop_get_templateID(bContext *C, PointerRNA *ptr, PropertyRNA **prop) +void UI_context_active_but_prop_get_templateID( + bContext *C, + PointerRNA *r_ptr, PropertyRNA **r_prop) { TemplateID *template; ARegion *ar = CTX_wm_region(C); uiBlock *block; uiBut *but; - memset(ptr, 0, sizeof(*ptr)); - *prop = NULL; + memset(r_ptr, 0, sizeof(*r_ptr)); + *r_prop = NULL; if (!ar) return; @@ -251,8 +253,8 @@ void UI_context_active_but_prop_get_templateID(bContext *C, PointerRNA *ptr, Pro if ((but->flag & (UI_BUT_LAST_ACTIVE | UI_ACTIVE))) { if (but->func_argN) { template = but->func_argN; - *ptr = template->ptr; - *prop = template->prop; + *r_ptr = template->ptr; + *r_prop = template->prop; return; } } |