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 <campbell@blender.org>2022-01-07 03:38:08 +0300
committerCampbell Barton <campbell@blender.org>2022-01-07 06:16:26 +0300
commit3d3bc748849834ef74563deb603ab43859cffeeb (patch)
treede74ce4722b2cb032c22dbc090a15dd2e172c29b /source/blender/windowmanager
parentbb69c19f08ac681d4386325e4318ebfbef2e9531 (diff)
Cleanup: remove redundant const qualifiers for POD types
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_api.h36
-rw-r--r--source/blender/windowmanager/WM_keymap.h61
-rw-r--r--source/blender/windowmanager/gizmo/WM_gizmo_api.h19
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h8
-rw-r--r--source/blender/windowmanager/wm_event_types.h2
-rw-r--r--source/blender/windowmanager/wm_window.h12
6 files changed, 60 insertions, 78 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 4ffd31a9923..9a8a6a3a3ac 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -118,7 +118,7 @@ void WM_init(struct bContext *C, int argc, const char **argv);
/**
* \note doesn't run exit() call #WM_exit() for that.
*/
-void WM_exit_ex(struct bContext *C, const bool do_python);
+void WM_exit_ex(struct bContext *C, bool do_python);
/**
* \brief Main exit function to close Blender ordinarily.
@@ -277,7 +277,7 @@ struct ID *WM_file_link_datablock(struct Main *bmain,
struct ViewLayer *view_layer,
struct View3D *v3d,
const char *filepath,
- const short id_code,
+ short id_code,
const char *id_name,
int flag);
/**
@@ -289,7 +289,7 @@ struct ID *WM_file_append_datablock(struct Main *bmain,
struct ViewLayer *view_layer,
struct View3D *v3d,
const char *filepath,
- const short id_code,
+ short id_code,
const char *id_name,
int flag);
void WM_lib_reload(struct Library *lib, struct bContext *C, struct ReportList *reports);
@@ -404,7 +404,7 @@ struct wmEventHandler_UI *WM_event_add_ui_handler(const struct bContext *C,
wmUIHandlerFunc handle_fn,
wmUIHandlerRemoveFunc remove_fn,
void *user_data,
- const char flag);
+ char flag);
/**
* \param postpone: Enable for `win->modalhandlers`,
* this is in a running for () loop in wm_handlers_do().
@@ -413,7 +413,7 @@ void WM_event_remove_ui_handler(ListBase *handlers,
wmUIHandlerFunc handle_fn,
wmUIHandlerRemoveFunc remove_fn,
void *user_data,
- const bool postpone);
+ bool postpone);
void WM_event_remove_area_handler(struct ListBase *handlers, void *area);
void WM_event_free_ui_handler_all(struct bContext *C,
ListBase *handlers,
@@ -605,7 +605,7 @@ int WM_operator_ui_popup(struct bContext *C, struct wmOperator *op, int width);
int WM_operator_confirm_message_ex(struct bContext *C,
struct wmOperator *op,
const char *title,
- const int icon,
+ int icon,
const char *message,
const wmOperatorCallContext opcontext);
int WM_operator_confirm_message(struct bContext *C, struct wmOperator *op, const char *message);
@@ -638,7 +638,7 @@ bool WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, sho
*
* \warning do not use this within an operator to call its self! T29537.
*/
-int WM_operator_call_ex(struct bContext *C, struct wmOperator *op, const bool store);
+int WM_operator_call_ex(struct bContext *C, struct wmOperator *op, bool store);
int WM_operator_call(struct bContext *C, struct wmOperator *op);
/**
* This is intended to be used when an invoke operator wants to call exec on its self
@@ -688,7 +688,7 @@ int WM_operator_call_py(struct bContext *C,
wmOperatorCallContext context,
struct PointerRNA *properties,
struct ReportList *reports,
- const bool is_undo);
+ bool is_undo);
void WM_operator_name_call_ptr_with_depends_on_cursor(struct bContext *C,
wmOperatorType *ot,
@@ -706,7 +706,7 @@ void WM_operator_properties_alloc(struct PointerRNA **ptr,
/**
* Make props context sensitive or not.
*/
-void WM_operator_properties_sanitize(struct PointerRNA *ptr, const bool no_context);
+void WM_operator_properties_sanitize(struct PointerRNA *ptr, bool no_context);
/**
* Set all props to their default.
@@ -716,7 +716,7 @@ void WM_operator_properties_sanitize(struct PointerRNA *ptr, const bool no_conte
* \note There's nothing specific to operators here.
* This could be made a general function.
*/
-bool WM_operator_properties_default(struct PointerRNA *ptr, const bool do_update);
+bool WM_operator_properties_default(struct PointerRNA *ptr, bool do_update);
/**
* Remove all props without #PROP_SKIP_SAVE.
*/
@@ -738,7 +738,7 @@ wmOperator *WM_operator_last_redo(const struct bContext *C);
/**
* Use for drag & drop a path or name with operators invoke() function.
*/
-ID *WM_operator_drop_load_path(struct bContext *C, struct wmOperator *op, const short idcode);
+ID *WM_operator_drop_load_path(struct bContext *C, struct wmOperator *op, short idcode);
bool WM_operator_last_properties_init(struct wmOperator *op);
bool WM_operator_last_properties_store(struct wmOperator *op);
@@ -870,14 +870,14 @@ bool WM_operator_properties_checker_interval_test(const struct CheckerIntervalPa
*/
char *WM_operator_pystring_ex(struct bContext *C,
struct wmOperator *op,
- const bool all_args,
- const bool macro_args,
+ bool all_args,
+ bool macro_args,
struct wmOperatorType *ot,
struct PointerRNA *opptr);
char *WM_operator_pystring(struct bContext *C,
struct wmOperator *op,
- const bool all_args,
- const bool macro_args);
+ bool all_args,
+ bool macro_args);
/**
* \return true if the string was shortened.
*/
@@ -1243,7 +1243,7 @@ void wmOrtho2(float x1, float x2, float y1, float y2);
* Default pixel alignment for regions.
*/
void wmOrtho2_region_pixelspace(const struct ARegion *region);
-void wmOrtho2_pixelspace(const float x, const float y);
+void wmOrtho2_pixelspace(float x, float y);
void wmGetProjectionMatrix(float mat[4][4], const struct rcti *winrct);
/* threaded Jobs Manager */
@@ -1481,9 +1481,7 @@ int WM_userdef_event_map(int kmitype);
int WM_userdef_event_type_from_keymap_type(int kmitype);
#ifdef WITH_INPUT_NDOF
-void WM_event_ndof_pan_get(const struct wmNDOFMotionData *ndof,
- float r_pan[3],
- const bool use_zoom);
+void WM_event_ndof_pan_get(const struct wmNDOFMotionData *ndof, float r_pan[3], bool use_zoom);
void WM_event_ndof_rotate_get(const struct wmNDOFMotionData *ndof, float r_rot[3]);
float WM_event_ndof_to_axis_angle(const struct wmNDOFMotionData *ndof, float axis[3]);
diff --git a/source/blender/windowmanager/WM_keymap.h b/source/blender/windowmanager/WM_keymap.h
index 4d1f2d979cb..4f1a2c8b923 100644
--- a/source/blender/windowmanager/WM_keymap.h
+++ b/source/blender/windowmanager/WM_keymap.h
@@ -63,10 +63,7 @@ wmKeyMapItem *WM_keymap_add_item(
wmKeyMapItem *WM_keymap_add_item_copy(struct wmKeyMap *keymap, wmKeyMapItem *kmi_src);
bool WM_keymap_remove_item(struct wmKeyMap *keymap, struct wmKeyMapItem *kmi);
-int WM_keymap_item_to_string(const wmKeyMapItem *kmi,
- const bool compact,
- char *result,
- const int result_len);
+int WM_keymap_item_to_string(const wmKeyMapItem *kmi, bool compact, char *result, int result_len);
wmKeyMap *WM_keymap_list_find(ListBase *lb, const char *idname, int spaceid, int regionid);
wmKeyMap *WM_keymap_list_find_spaceid_or_empty(ListBase *lb,
@@ -135,26 +132,20 @@ wmKeyMap *WM_keymap_guess_from_context(const struct bContext *C);
*/
wmKeyMap *WM_keymap_guess_opname(const struct bContext *C, const char *opname);
-bool WM_keymap_uses_event_modifier(const wmKeyMap *keymap, const int event_modifier);
+bool WM_keymap_uses_event_modifier(const wmKeyMap *keymap, int event_modifier);
void WM_keymap_fix_linking(void);
/* Modal Keymap */
-int WM_modalkeymap_items_to_string(const struct wmKeyMap *km,
- const int propvalue,
- const bool compact,
- char *result,
- const int result_len);
-int WM_modalkeymap_operator_items_to_string(struct wmOperatorType *ot,
- const int propvalue,
- const bool compact,
- char *result,
- const int result_len);
+int WM_modalkeymap_items_to_string(
+ const struct wmKeyMap *km, int propvalue, bool compact, char *result, int result_len);
+int WM_modalkeymap_operator_items_to_string(
+ struct wmOperatorType *ot, int propvalue, bool compact, char *result, int result_len);
char *WM_modalkeymap_operator_items_to_string_buf(struct wmOperatorType *ot,
- const int propvalue,
- const bool compact,
- const int max_len,
+ int propvalue,
+ bool compact,
+ int max_len,
int *r_available_len,
char **r_result);
@@ -166,7 +157,7 @@ wmKeyMapItem *WM_modalkeymap_add_item(
struct wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value);
wmKeyMapItem *WM_modalkeymap_add_item_str(
struct wmKeyMap *km, int type, int val, int modifier, int keymodifier, const char *value);
-const wmKeyMapItem *WM_modalkeymap_find_propvalue(const wmKeyMap *km, const int propvalue);
+const wmKeyMapItem *WM_modalkeymap_find_propvalue(const wmKeyMap *km, int propvalue);
void WM_modalkeymap_assign(struct wmKeyMap *km, const char *opname);
/* Keymap Editor */
@@ -183,17 +174,17 @@ int WM_keymap_item_map_type_get(const struct wmKeyMapItem *kmi);
/* Key Event */
-const char *WM_key_event_string(const short type, const bool compact);
-int WM_keymap_item_raw_to_string(const short shift,
- const short ctrl,
- const short alt,
- const short oskey,
- const short keymodifier,
- const short val,
- const short type,
- const bool compact,
+const char *WM_key_event_string(short type, bool compact);
+int WM_keymap_item_raw_to_string(short shift,
+ short ctrl,
+ short alt,
+ short oskey,
+ short keymodifier,
+ short val,
+ short type,
+ bool compact,
char *result,
- const int result_len);
+ int result_len);
/**
* \param include_mask, exclude_mask:
* Event types to include/exclude when looking up keys (#eEventType_Mask).
@@ -202,22 +193,22 @@ wmKeyMapItem *WM_key_event_operator(const struct bContext *C,
const char *opname,
wmOperatorCallContext opcontext,
struct IDProperty *properties,
- const short include_mask,
- const short exclude_mask,
+ short include_mask,
+ short exclude_mask,
struct wmKeyMap **r_keymap);
char *WM_key_event_operator_string(const struct bContext *C,
const char *opname,
wmOperatorCallContext opcontext,
struct IDProperty *properties,
- const bool is_strict,
+ bool is_strict,
char *result,
- const int result_len);
+ int result_len);
wmKeyMapItem *WM_key_event_operator_from_keymap(struct wmKeyMap *keymap,
const char *opname,
struct IDProperty *properties,
- const short include_mask,
- const short exclude_mask);
+ short include_mask,
+ short exclude_mask);
const char *WM_bool_as_string(bool test);
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_api.h b/source/blender/windowmanager/gizmo/WM_gizmo_api.h
index 8691ebe06ec..5bcb9b195bf 100644
--- a/source/blender/windowmanager/gizmo/WM_gizmo_api.h
+++ b/source/blender/windowmanager/gizmo/WM_gizmo_api.h
@@ -138,9 +138,9 @@ void WM_gizmo_set_matrix_offset_rotation_from_yz_axis(struct wmGizmo *gz,
const float y_axis[3],
const float z_axis[3]);
-void WM_gizmo_set_flag(struct wmGizmo *gz, const int flag, const bool enable);
-void WM_gizmo_set_scale(struct wmGizmo *gz, const float scale);
-void WM_gizmo_set_line_width(struct wmGizmo *gz, const float line_width);
+void WM_gizmo_set_flag(struct wmGizmo *gz, int flag, bool enable);
+void WM_gizmo_set_scale(struct wmGizmo *gz, float scale);
+void WM_gizmo_set_line_width(struct wmGizmo *gz, float line_width);
void WM_gizmo_get_color(const struct wmGizmo *gz, float color[4]);
void WM_gizmo_set_color(struct wmGizmo *gz, const float color[4]);
@@ -175,7 +175,7 @@ void WM_gizmo_properties_create(struct PointerRNA *ptr, const char *gtstring);
void WM_gizmo_properties_alloc(struct PointerRNA **ptr,
struct IDProperty **properties,
const char *gtstring);
-void WM_gizmo_properties_sanitize(struct PointerRNA *ptr, const bool no_context);
+void WM_gizmo_properties_sanitize(struct PointerRNA *ptr, bool no_context);
/**
* Set all props to their default.
*
@@ -184,7 +184,7 @@ void WM_gizmo_properties_sanitize(struct PointerRNA *ptr, const bool no_context)
* \note There's nothing specific to gizmos here.
* This could be made a general function.
*/
-bool WM_gizmo_properties_default(struct PointerRNA *ptr, const bool do_update);
+bool WM_gizmo_properties_default(struct PointerRNA *ptr, bool do_update);
/**
* Remove all props without #PROP_SKIP_SAVE.
*/
@@ -274,7 +274,7 @@ float WM_gizmo_target_property_float_get(const struct wmGizmo *gz,
void WM_gizmo_target_property_float_set(struct bContext *C,
const struct wmGizmo *gz,
struct wmGizmoProperty *gz_prop,
- const float value);
+ float value);
void WM_gizmo_target_property_float_get_array(const struct wmGizmo *gz,
struct wmGizmoProperty *gz_prop,
@@ -376,15 +376,14 @@ struct wmGizmoGroup *WM_gizmomap_group_find_ptr(struct wmGizmoMap *gzmap,
const struct wmGizmoGroupType *gzgt);
eWM_GizmoFlagMapDrawStep WM_gizmomap_drawstep_from_gizmo_group(const struct wmGizmoGroup *gzgroup);
-void WM_gizmomap_tag_refresh_drawstep(struct wmGizmoMap *gzmap,
- const eWM_GizmoFlagMapDrawStep drawstep);
+void WM_gizmomap_tag_refresh_drawstep(struct wmGizmoMap *gzmap, eWM_GizmoFlagMapDrawStep drawstep);
void WM_gizmomap_tag_refresh(struct wmGizmoMap *gzmap);
bool WM_gizmomap_tag_delay_refresh_for_tweak_check(struct wmGizmoMap *gzmap);
void WM_gizmomap_draw(struct wmGizmoMap *gzmap,
const struct bContext *C,
- const eWM_GizmoFlagMapDrawStep drawstep);
+ eWM_GizmoFlagMapDrawStep drawstep);
void WM_gizmomap_add_handlers(struct ARegion *region, struct wmGizmoMap *gzmap);
/**
* Select/Deselect all selectable gizmos in \a gzmap.
@@ -392,7 +391,7 @@ void WM_gizmomap_add_handlers(struct ARegion *region, struct wmGizmoMap *gzmap);
*
* TODO: select all by type.
*/
-bool WM_gizmomap_select_all(struct bContext *C, struct wmGizmoMap *gzmap, const int action);
+bool WM_gizmomap_select_all(struct bContext *C, struct wmGizmoMap *gzmap, int action);
bool WM_gizmomap_cursor_set(const struct wmGizmoMap *gzmap, struct wmWindow *win);
void WM_gizmomap_message_subscribe(const struct bContext *C,
struct wmGizmoMap *gzmap,
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h b/source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h
index b6912d79076..187612f2651 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h
@@ -40,7 +40,7 @@ bool wm_gizmo_select_set_ex(
bool wm_gizmo_select_and_highlight(bContext *C, struct wmGizmoMap *gzmap, struct wmGizmo *gz);
void wm_gizmo_calculate_scale(struct wmGizmo *gz, const bContext *C);
-void wm_gizmo_update(struct wmGizmo *gz, const bContext *C, const bool refresh_map);
+void wm_gizmo_update(struct wmGizmo *gz, const bContext *C, bool refresh_map);
int wm_gizmo_is_visible(struct wmGizmo *gz);
enum {
@@ -75,7 +75,7 @@ struct wmGizmoGroup *wm_gizmogroup_find_by_type(const struct wmGizmoMap *gzmap,
struct wmGizmo *wm_gizmogroup_find_intersected_gizmo(wmWindowManager *wm,
const struct wmGizmoGroup *gzgroup,
struct bContext *C,
- const int event_modifier,
+ int event_modifier,
const int mval[2],
int *r_part);
/**
@@ -84,10 +84,10 @@ struct wmGizmo *wm_gizmogroup_find_intersected_gizmo(wmWindowManager *wm,
*/
void wm_gizmogroup_intersectable_gizmos_to_list(wmWindowManager *wm,
const struct wmGizmoGroup *gzgroup,
- const int event_modifier,
+ int event_modifier,
struct BLI_Buffer *visible_gizmos);
bool wm_gizmogroup_is_visible_in_drawstep(const struct wmGizmoGroup *gzgroup,
- const eWM_GizmoFlagMapDrawStep drawstep);
+ eWM_GizmoFlagMapDrawStep drawstep);
void wm_gizmogrouptype_setup_keymap(struct wmGizmoGroupType *gzgt, struct wmKeyConfig *keyconf);
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index 437bd1057c2..4ed1b7b9d0d 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -436,7 +436,7 @@ enum eEventType_Mask {
(EVT_TYPE_MASK_KEYBOARD | EVT_TYPE_MASK_MOUSE | EVT_TYPE_MASK_NDOF)
#define EVT_TYPE_MASK_HOTKEY_EXCLUDE EVT_TYPE_MASK_KEYBOARD_MODIFIER
-bool WM_event_type_mask_test(const int event_type, const enum eEventType_Mask mask);
+bool WM_event_type_mask_test(int event_type, enum eEventType_Mask mask);
/* ********** wmEvent.val ********** */
diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h
index e44a39ecf1a..b003a4f92e7 100644
--- a/source/blender/windowmanager/wm_window.h
+++ b/source/blender/windowmanager/wm_window.h
@@ -58,19 +58,13 @@ wmWindow *wm_window_new(const struct Main *bmain,
/**
* Part of `wm_window.c` API.
*/
-wmWindow *wm_window_copy(struct Main *bmain,
- wmWindowManager *wm,
- wmWindow *win_src,
- const bool duplicate_layout,
- const bool child);
+wmWindow *wm_window_copy(
+ struct Main *bmain, wmWindowManager *wm, wmWindow *win_src, bool duplicate_layout, bool child);
/**
* A higher level version of copy that tests the new window can be added.
* (called from the operator directly).
*/
-wmWindow *wm_window_copy_test(bContext *C,
- wmWindow *win_src,
- const bool duplicate_layout,
- const bool child);
+wmWindow *wm_window_copy_test(bContext *C, wmWindow *win_src, bool duplicate_layout, bool child);
/**
* Including window itself.
* \param C: can be NULL.