[Bf-blender-cvs] [6bd42baaeba] master: Cleanup: Use const for UI icon getter function

Julian Eisel noreply at git.blender.org
Thu Jul 15 16:14:27 CEST 2021


Commit: 6bd42baaebac3255082eb46884bdd3e27361c135
Author: Julian Eisel
Date:   Tue Jul 13 18:05:16 2021 +0200
Branches: master
https://developer.blender.org/rB6bd42baaebac3255082eb46884bdd3e27361c135

Cleanup: Use const for UI icon getter function

===================================================================

M	source/blender/editors/include/UI_interface_icons.h
M	source/blender/editors/interface/interface_icons.c

===================================================================

diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h
index 266a538b6c3..37cf7229ffb 100644
--- a/source/blender/editors/include/UI_interface_icons.h
+++ b/source/blender/editors/include/UI_interface_icons.h
@@ -105,7 +105,10 @@ int UI_iconfile_get_index(const char *filename);
 
 struct PreviewImage *UI_icon_to_preview(int icon_id);
 
-int UI_icon_from_rnaptr(struct bContext *C, struct PointerRNA *ptr, int rnaicon, const bool big);
+int UI_icon_from_rnaptr(const struct bContext *C,
+                        struct PointerRNA *ptr,
+                        int rnaicon,
+                        const bool big);
 int UI_icon_from_idcode(const int idcode);
 int UI_icon_from_library(const struct ID *id);
 int UI_icon_from_object_mode(const int mode);
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 2a505abe257..43ac646f053 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -2201,7 +2201,7 @@ int UI_icon_from_library(const ID *id)
   return ICON_NONE;
 }
 
-int UI_icon_from_rnaptr(bContext *C, PointerRNA *ptr, int rnaicon, const bool big)
+int UI_icon_from_rnaptr(const bContext *C, PointerRNA *ptr, int rnaicon, const bool big)
 {
   ID *id = NULL;



More information about the Bf-blender-cvs mailing list