Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-01-26 23:12:11 +0300
committerJulian Eisel <julian@blender.org>2021-01-27 00:17:17 +0300
commit656f6ae6436ae10cae4820a5c957041a20d56995 (patch)
treeeb5b29cf9d23dd228db69ff0cccc92647d50bff5 /source/blender/editors/interface
parent733bcbed46ed46fba10bc95c09d4dab22f32ac69 (diff)
Cleanup: Use const parameters for active button lookups/tests
Needed for const-correctness in the following commit.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 377e55e7299..abb9d0dcc13 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -8317,7 +8317,7 @@ void ui_but_active_free(const bContext *C, uiBut *but)
}
/* returns the active button with an optional checking function */
-static uiBut *ui_context_button_active(ARegion *region, bool (*but_check_cb)(uiBut *))
+static uiBut *ui_context_button_active(const ARegion *region, bool (*but_check_cb)(const uiBut *))
{
uiBut *but_found = NULL;
@@ -8358,7 +8358,7 @@ static uiBut *ui_context_button_active(ARegion *region, bool (*but_check_cb)(uiB
return but_found;
}
-static bool ui_context_rna_button_active_test(uiBut *but)
+static bool ui_context_rna_button_active_test(const uiBut *but)
{
return (but->rnapoin.data != NULL);
}
@@ -8383,7 +8383,7 @@ uiBut *UI_context_active_but_get_respect_menu(const bContext *C)
return ui_context_button_active(region_menu ? region_menu : CTX_wm_region(C), NULL);
}
-uiBut *UI_region_active_but_get(ARegion *region)
+uiBut *UI_region_active_but_get(const ARegion *region)
{
return ui_context_button_active(region, NULL);
}