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:
authorCampbell Barton <ideasman42@gmail.com>2021-10-15 08:24:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-15 08:32:06 +0300
commitbeecd24fc68b0b587183bde8cfd4cf49da2d998b (patch)
tree1c71a8bdb7d2cf1225a66de94400085e81d633fb /source/blender
parent3ca26970010111abf59951f6b07507ea23159a15 (diff)
Cleanup: use const for context argument
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/windowmanager/WM_api.h2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 68e2c6b38f0..26406966952 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -592,7 +592,7 @@ void WM_operator_py_idname(char *to, const char *from);
bool WM_operator_py_idname_ok_or_report(struct ReportList *reports,
const char *classname,
const char *idname);
-char *WM_context_path_resolve_property_full(struct bContext *C,
+char *WM_context_path_resolve_property_full(const struct bContext *C,
const PointerRNA *ptr,
PropertyRNA *prop,
int index);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 81dcc5ccea0..dff8e72a5fe 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -423,7 +423,9 @@ static const char *wm_context_member_from_ptr(bContext *C, const PointerRNA *ptr
* `object.data.bones["Bones"].use_deform` such paths are not useful for key-shortcuts,
* so this function supports returning data-paths directly to context members that aren't ID types.
*/
-static const char *wm_context_member_from_ptr(bContext *C, const PointerRNA *ptr, bool *r_is_id)
+static const char *wm_context_member_from_ptr(const bContext *C,
+ const PointerRNA *ptr,
+ bool *r_is_id)
{
const char *member_id = NULL;
bool is_id = false;
@@ -607,7 +609,7 @@ static const char *wm_context_member_from_ptr(bContext *C, const PointerRNA *ptr
/**
* Calculate the path to `ptr` from context `C`, or return NULL if it can't be calculated.
*/
-char *WM_context_path_resolve_property_full(bContext *C,
+char *WM_context_path_resolve_property_full(const bContext *C,
const PointerRNA *ptr,
PropertyRNA *prop,
int index)