[Bf-blender-cvs] [2fa7e81d9c4] master: Cleanup: use 'const' argument for parameter argument

Campbell Barton noreply at git.blender.org
Tue Jan 19 03:07:02 CET 2021


Commit: 2fa7e81d9c455fa188a291db4d1fd918592d3676
Author: Campbell Barton
Date:   Tue Jan 19 12:59:00 2021 +1100
Branches: master
https://developer.blender.org/rB2fa7e81d9c455fa188a291db4d1fd918592d3676

Cleanup: use 'const' argument for parameter argument

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

M	source/blender/blenkernel/BKE_screen.h
M	source/blender/editors/include/ED_screen.h
M	source/blender/editors/interface/interface_region_popup.c
M	source/blender/editors/screen/area.c
M	source/blender/editors/screen/area_utils.c
M	source/blender/editors/space_action/space_action.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/editors/space_clip/space_clip.c
M	source/blender/editors/space_console/space_console.c
M	source/blender/editors/space_file/space_file.c
M	source/blender/editors/space_graph/space_graph.c
M	source/blender/editors/space_image/space_image.c
M	source/blender/editors/space_info/space_info.c
M	source/blender/editors/space_nla/space_nla.c
M	source/blender/editors/space_node/space_node.c
M	source/blender/editors/space_outliner/space_outliner.c
M	source/blender/editors/space_script/space_script.c
M	source/blender/editors/space_sequencer/space_sequencer.c
M	source/blender/editors/space_statusbar/space_statusbar.c
M	source/blender/editors/space_text/space_text.c
M	source/blender/editors/space_topbar/space_topbar.c
M	source/blender/editors/space_userpref/space_userpref.c
M	source/blender/editors/space_view3d/space_view3d.c

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

diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index 4274d59cb9f..e9a141709b5 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -92,7 +92,7 @@ typedef struct SpaceType {
   /* exit is called when the area is hidden or removed */
   void (*exit)(struct wmWindowManager *wm, struct ScrArea *area);
   /* Listeners can react to bContext changes */
-  void (*listener)(wmSpaceTypeListenerParams *params);
+  void (*listener)(const wmSpaceTypeListenerParams *params);
 
   /* called when the mouse moves out of the area */
   void (*deactivate)(struct ScrArea *area);
@@ -179,9 +179,9 @@ typedef struct ARegionType {
   /* snap the size of the region (can be NULL for no snapping). */
   int (*snap_size)(const struct ARegion *region, int size, int axis);
   /* contextual changes should be handled here */
-  void (*listener)(wmRegionListenerParams *params);
+  void (*listener)(const wmRegionListenerParams *params);
   /* Optional callback to generate subscriptions. */
-  void (*message_subscribe)(wmRegionMessageSubscribeParams *params);
+  void (*message_subscribe)(const wmRegionMessageSubscribeParams *params);
 
   void (*free)(struct ARegion *);
 
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 571f4e74c60..deb6b7502c7 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -143,8 +143,8 @@ void ED_area_do_msg_notify_tag_refresh(struct bContext *C,
                                        struct wmMsgSubscribeKey *msg_key,
                                        struct wmMsgSubscribeValue *msg_val);
 
-void ED_area_do_mgs_subscribe_for_tool_header(struct wmRegionMessageSubscribeParams *params);
-void ED_area_do_mgs_subscribe_for_tool_ui(struct wmRegionMessageSubscribeParams *params);
+void ED_area_do_mgs_subscribe_for_tool_header(const struct wmRegionMessageSubscribeParams *params);
+void ED_area_do_mgs_subscribe_for_tool_ui(const struct wmRegionMessageSubscribeParams *params);
 
 /* message bus */
 void ED_region_message_subscribe(struct wmRegionMessageSubscribeParams *params);
@@ -409,7 +409,7 @@ void ED_region_cache_draw_cached_segments(struct ARegion *region,
 
 /* area_utils.c */
 void ED_region_generic_tools_region_message_subscribe(
-    struct wmRegionMessageSubscribeParams *params);
+    const struct wmRegionMessageSubscribeParams *params);
 int ED_region_generic_tools_region_snap_size(const struct ARegion *region, int size, int axis);
 
 /* area_query.c */
diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c
index c6c6cd1eeea..62b8ce9d3eb 100644
--- a/source/blender/editors/interface/interface_region_popup.c
+++ b/source/blender/editors/interface/interface_region_popup.c
@@ -413,7 +413,7 @@ static void ui_block_region_draw(const bContext *C, ARegion *region)
 /**
  * Use to refresh centered popups on screen resizing (for splash).
  */
-static void ui_block_region_popup_window_listener(wmRegionListenerParams *params)
+static void ui_block_region_popup_window_listener(const wmRegionListenerParams *params)
 {
   ARegion *region = params->region;
   wmNotifier *wmn = params->notifier;
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 24773ccbbee..a11dab0291a 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -421,7 +421,7 @@ void ED_area_do_msg_notify_tag_refresh(
 }
 
 /* Follow ARegionType.message_subscribe */
-void ED_area_do_mgs_subscribe_for_tool_header(wmRegionMessageSubscribeParams *params)
+void ED_area_do_mgs_subscribe_for_tool_header(const wmRegionMessageSubscribeParams *params)
 {
   struct wmMsgBus *mbus = params->message_bus;
   WorkSpace *workspace = params->workspace;
@@ -437,7 +437,7 @@ void ED_area_do_mgs_subscribe_for_tool_header(wmRegionMessageSubscribeParams *pa
       mbus, &workspace->id, workspace, WorkSpace, tools, &msg_sub_value_region_tag_redraw);
 }
 
-void ED_area_do_mgs_subscribe_for_tool_ui(wmRegionMessageSubscribeParams *params)
+void ED_area_do_mgs_subscribe_for_tool_ui(const wmRegionMessageSubscribeParams *params)
 {
   struct wmMsgBus *mbus = params->message_bus;
   WorkSpace *workspace = params->workspace;
diff --git a/source/blender/editors/screen/area_utils.c b/source/blender/editors/screen/area_utils.c
index e362563260b..b784a4b0056 100644
--- a/source/blender/editors/screen/area_utils.c
+++ b/source/blender/editors/screen/area_utils.c
@@ -44,7 +44,7 @@
 /**
  * Callback for #ARegionType.message_subscribe
  */
-void ED_region_generic_tools_region_message_subscribe(wmRegionMessageSubscribeParams *params)
+void ED_region_generic_tools_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
 {
   struct wmMsgBus *mbus = params->message_bus;
   ARegion *region = params->region;
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 9cb7ec69df1..691287a543f 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -305,7 +305,7 @@ static void action_header_region_draw(const bContext *C, ARegion *region)
   ED_region_header(C, region);
 }
 
-static void action_channel_region_listener(wmRegionListenerParams *params)
+static void action_channel_region_listener(const wmRegionListenerParams *params)
 {
   ARegion *region = params->region;
   wmNotifier *wmn = params->notifier;
@@ -355,7 +355,7 @@ static void action_channel_region_listener(wmRegionListenerParams *params)
   }
 }
 
-static void saction_channel_region_message_subscribe(wmRegionMessageSubscribeParams *params)
+static void saction_channel_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
 {
   struct wmMsgBus *mbus = params->message_bus;
   bScreen *screen = params->screen;
@@ -399,7 +399,7 @@ static void saction_channel_region_message_subscribe(wmRegionMessageSubscribePar
   }
 }
 
-static void action_main_region_listener(wmRegionListenerParams *params)
+static void action_main_region_listener(const wmRegionListenerParams *params)
 {
   ARegion *region = params->region;
   wmNotifier *wmn = params->notifier;
@@ -457,7 +457,7 @@ static void action_main_region_listener(wmRegionListenerParams *params)
   }
 }
 
-static void saction_main_region_message_subscribe(wmRegionMessageSubscribeParams *params)
+static void saction_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
 {
   struct wmMsgBus *mbus = params->message_bus;
   Scene *scene = params->scene;
@@ -503,7 +503,7 @@ static void saction_main_region_message_subscribe(wmRegionMessageSubscribeParams
 }
 
 /* editor level listener */
-static void action_listener(wmSpaceTypeListenerParams *params)
+static void action_listener(const wmSpaceTypeListenerParams *params)
 {
   ScrArea *area = params->area;
   wmNotifier *wmn = params->notifier;
@@ -656,7 +656,7 @@ static void action_listener(wmSpaceTypeListenerParams *params)
   }
 }
 
-static void action_header_region_listener(wmRegionListenerParams *params)
+static void action_header_region_listener(const wmRegionListenerParams *params)
 {
   ScrArea *area = params->area;
   ARegion *region = params->region;
@@ -732,7 +732,7 @@ static void action_buttons_area_draw(const bContext *C, ARegion *region)
   ED_region_panels(C, region);
 }
 
-static void action_region_listener(wmRegionListenerParams *params)
+static void action_region_listener(const wmRegionListenerParams *params)
 {
   ARegion *region = params->region;
   wmNotifier *wmn = params->notifier;
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 797bb00dec2..07bc1d42c3f 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -514,7 +514,7 @@ static void buttons_main_region_layout(const bContext *C, ARegion *region)
   sbuts->mainbo = sbuts->mainb;
 }
 
-static void buttons_main_region_listener(wmRegionListenerParams *params)
+static void buttons_main_region_listener(const wmRegionListenerParams *params)
 {
   ARegion *region = params->region;
   wmNotifier *wmn = params->notifier;
@@ -566,7 +566,7 @@ static void buttons_header_region_draw(const bContext *C, ARegion *region)
   ED_region_header(C, region);
 }
 
-static void buttons_header_region_message_subscribe(wmRegionMessageSubscribeParams *params)
+static void buttons_header_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
 {
   struct wmMsgBus *mbus = params->message_bus;
   ScrArea *area = params->area;
@@ -618,7 +618,8 @@ static void buttons_navigation_bar_region_draw(const bContext *C, ARegion *regio
   ED_region_panels_draw(C, region);
 }
 
-static void buttons_navigation_bar_region_message_subscribe(wmRegionMessageSubscribeParams *params)
+static void buttons_navigation_bar_region_message_subscribe(
+    const wmRegionMessageSubscribeParams *params)
 {
   struct wmMsgBus *mbus = params->message_bus;
   ARegion *region = params->region;
@@ -651,7 +652,7 @@ static void buttons_area_redraw(ScrArea *area, short buttons)
  * \{ */
 
 /* reused! */
-static void buttons_area_listener(wmSpaceTypeListenerParams *params)
+static void buttons_area_listener(const wmSpaceTypeListenerParams *params)
 {
   ScrArea *area = params->area;
   wmNotifier *wmn = params->notifier;
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 3806c1494e3..6b514935863 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -334,7 +334,7 @@ static SpaceLink *clip_duplicate(SpaceLink *sl)
   return (SpaceLink *)scn;
 }
 
-static void clip_listener(wmSpaceTypeListenerParams *params)
+static void clip_listener(const wmSpaceTypeListenerParams *params)
 {
   ScrArea *area = params->area;
   wmNotifier *wmn = params->notifier;
@@ -1008,7 +1008,7 @@ static void clip_main_region_draw(const bContext *C, ARegion *region)
   WM_gizmomap_draw(region-

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list