diff --git a/intern/ghost/intern/GHOST_WindowWayland.cc b/intern/ghost/intern/GHOST_WindowWayland.cc index bd2976f4686..9786ac22994 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cc +++ b/intern/ghost/intern/GHOST_WindowWayland.cc @@ -329,7 +329,7 @@ static GHOST_TSuccess gwl_window_cursor_custom_load(const GWL_WindowCursorCustom } static GHOST_TSuccess gwl_window_cursor_shape_refresh(GHOST_TStandardCursor shape, - GWL_WindowCursorCustomShape &ccs, + const GWL_WindowCursorCustomShape &ccs, GHOST_SystemWayland *system) { #ifdef USE_EVENT_BACKGROUND_THREAD diff --git a/source/blender/animrig/intern/action.cc b/source/blender/animrig/intern/action.cc index 120a2113b45..3ff214fe2b5 100644 --- a/source/blender/animrig/intern/action.cc +++ b/source/blender/animrig/intern/action.cc @@ -1765,7 +1765,7 @@ bActionGroup *ChannelBag::channel_group_find(const StringRef name) int ChannelBag::channel_group_containing_index(const int fcurve_array_index) { int i = 0; - for (bActionGroup *group : this->channel_groups()) { + for (const bActionGroup *group : this->channel_groups()) { if (fcurve_array_index >= group->fcurve_range_start && fcurve_array_index < (group->fcurve_range_start + group->fcurve_range_length)) { @@ -1787,7 +1787,7 @@ bActionGroup &ChannelBag::channel_group_create(StringRefNull name) int fcurve_index = 0; const int length = this->channel_groups().size(); if (length > 0) { - bActionGroup *last = this->channel_group(length - 1); + const bActionGroup *last = this->channel_group(length - 1); fcurve_index = last->fcurve_range_start + last->fcurve_range_length; } new_group->fcurve_range_start = fcurve_index; @@ -1805,7 +1805,7 @@ bActionGroup &ChannelBag::channel_group_create(StringRefNull name) * match that system's behavior, even when it's goofy.*/ std::string unique_name = BLI_uniquename_cb( [&](const StringRef name) { - for (bActionGroup *group : this->channel_groups()) { + for (const bActionGroup *group : this->channel_groups()) { if (STREQ(group->name, name.data())) { return true; } @@ -1841,7 +1841,7 @@ bool ChannelBag::channel_group_remove(bActionGroup &group) /* Move the group's fcurves to just past the end of where the grouped * fcurves will be after this group is removed. */ - bActionGroup *last_group = this->channel_groups().last(); + const bActionGroup *last_group = this->channel_groups().last(); BLI_assert(last_group != nullptr); const int to_index = last_group->fcurve_range_start + last_group->fcurve_range_length - group.fcurve_range_length; diff --git a/source/blender/blenkernel/intern/action.cc b/source/blender/blenkernel/intern/action.cc index a9415d3cba1..07c0588b26d 100644 --- a/source/blender/blenkernel/intern/action.cc +++ b/source/blender/blenkernel/intern/action.cc @@ -296,7 +296,7 @@ static void write_channelbag(BlendWriter *writer, animrig::ChannelBag &channelba Span groups = channelbag.channel_groups(); BLO_write_pointer_array(writer, groups.size(), groups.data()); - for (bActionGroup *group : groups) { + for (const bActionGroup *group : groups) { BLO_write_struct(writer, bActionGroup, group); } diff --git a/source/blender/blenkernel/intern/blendfile_link_append.cc b/source/blender/blenkernel/intern/blendfile_link_append.cc index f04f554b649..5e9d1a81edb 100644 --- a/source/blender/blenkernel/intern/blendfile_link_append.cc +++ b/source/blender/blenkernel/intern/blendfile_link_append.cc @@ -621,7 +621,7 @@ static void loose_data_instantiate_obdata_preprocess( continue; } if (idcode == ID_GD_LEGACY) { - bGPdata *legacy_gpd = reinterpret_cast(id); + const bGPdata *legacy_gpd = reinterpret_cast(id); if ((legacy_gpd->flag & GP_DATA_ANNOTATIONS) != 0) { continue; } diff --git a/source/blender/blenkernel/intern/nla.cc b/source/blender/blenkernel/intern/nla.cc index a3a55597162..ac3d98f3ea0 100644 --- a/source/blender/blenkernel/intern/nla.cc +++ b/source/blender/blenkernel/intern/nla.cc @@ -2671,7 +2671,7 @@ namespace blender::bke::nla { bool foreach_strip(ID *id, blender::FunctionRef callback) { - AnimData *adt = BKE_animdata_from_id(id); + const AnimData *adt = BKE_animdata_from_id(id); if (!adt) { /* Having no NLA trivially means that we've looped through all the strips. */ return true; diff --git a/source/blender/blenkernel/intern/pbvh_uv_islands.cc b/source/blender/blenkernel/intern/pbvh_uv_islands.cc index bbb56c3a538..58fce1923e4 100644 --- a/source/blender/blenkernel/intern/pbvh_uv_islands.cc +++ b/source/blender/blenkernel/intern/pbvh_uv_islands.cc @@ -850,7 +850,7 @@ static int find_fill_primitive(const MeshData &mesh_data, UVBorderCorner &corner if (corner.first->get_uv_vertex(0) == corner.second->get_uv_vertex(1)) { return -1; } - UVVertex *shared_vert = corner.second->get_uv_vertex(0); + const UVVertex *shared_vert = corner.second->get_uv_vertex(0); for (const int edge_i : mesh_data.vert_to_edge_map[shared_vert->vertex]) { const int2 &edge = mesh_data.edges[edge_i]; if (corner.first->edge->has_same_vertices(edge)) { diff --git a/source/blender/blenkernel/intern/screen.cc b/source/blender/blenkernel/intern/screen.cc index c300b349ab2..13c7cf03e19 100644 --- a/source/blender/blenkernel/intern/screen.cc +++ b/source/blender/blenkernel/intern/screen.cc @@ -879,11 +879,11 @@ std::optional BKE_screen_path_from_screen_to_space(const PointerRNA return std::nullopt; } - bScreen *screen = reinterpret_cast(ptr->owner_id); - SpaceLink *link = static_cast(ptr->data); + const bScreen *screen = reinterpret_cast(ptr->owner_id); + const SpaceLink *link = static_cast(ptr->data); int area_index; - LISTBASE_FOREACH_INDEX (ScrArea *, area, &screen->areabase, area_index) { + LISTBASE_FOREACH_INDEX (const ScrArea *, area, &screen->areabase, area_index) { const int space_index = BLI_findindex(&area->spacedata, link); if (space_index != -1) { return fmt::format("areas[{}].spaces[{}]", area_index, space_index); diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc index b51de8ca9e8..da24c2292f7 100644 --- a/source/blender/blenlib/intern/delaunay_2d.cc +++ b/source/blender/blenlib/intern/delaunay_2d.cc @@ -1495,7 +1495,7 @@ template static void re_delaunay_triangulate(CDTArrangement *cdt, } /* `se` is a diagonal just added, and it is base of area to re-triangulate (face on its left). */ int count = 1; - for (SymEdge *ss = se->next; ss != se; ss = ss->next) { + for (const SymEdge *ss = se->next; ss != se; ss = ss->next) { count++; } if (count <= 3) { diff --git a/source/blender/blentranslation/msgfmt/msgfmt.cc b/source/blender/blentranslation/msgfmt/msgfmt.cc index 4ce2ad29e75..9adc2b91cb1 100644 --- a/source/blender/blentranslation/msgfmt/msgfmt.cc +++ b/source/blender/blentranslation/msgfmt/msgfmt.cc @@ -142,7 +142,9 @@ static char *generate(blender::Map &messages, size_t * for (const auto message_items_iter : messages.items()) { items.append(Item(message_items_iter)); } - std::sort(items.begin(), items.end(), [](Item &a, Item &b) -> bool { return a.key < b.key; }); + std::sort(items.begin(), items.end(), [](const Item &a, const Item &b) -> bool { + return a.key < b.key; + }); Offset *offsets = MEM_cnew_array(num_keys, __func__); uint32_t tot_keys_len = 0; diff --git a/source/blender/editors/gpencil_legacy/gpencil_convert.cc b/source/blender/editors/gpencil_legacy/gpencil_convert.cc index 51d01e08f28..6702ba42fb0 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_convert.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_convert.cc @@ -1238,7 +1238,7 @@ static int gpencil_camera_view_subrect(bContext *C, rctf *subrect) /* for camera view set the subrect */ if (rv3d->persp == RV3D_CAMOB) { - Scene *scene = CTX_data_scene(C); + const Scene *scene = CTX_data_scene(C); Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); ED_view3d_calc_camera_border(scene, depsgraph, region, v3d, rv3d, subrect, true); return 1; diff --git a/source/blender/editors/gpencil_legacy/gpencil_ops.cc b/source/blender/editors/gpencil_legacy/gpencil_ops.cc index 108840b6f48..5332729b8e6 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_ops.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_ops.cc @@ -72,12 +72,12 @@ static bool gpencil_stroke_paintmode_poll_with_tool(bContext *C, const char gpen return false; } - ToolSettings *ts = CTX_data_tool_settings(C); + const ToolSettings *ts = CTX_data_tool_settings(C); if (!ts || !ts->gp_paint) { return false; } - Brush *brush = BKE_paint_brush(&ts->gp_paint->paint); + const Brush *brush = BKE_paint_brush(&ts->gp_paint->paint); return ((gpd->flag & GP_DATA_STROKE_PAINTMODE) && (brush && brush->gpencil_settings) && WM_toolsystem_active_tool_is_brush(C) && (brush->gpencil_brush_type == gpencil_brush_type)); @@ -86,17 +86,17 @@ static bool gpencil_stroke_paintmode_poll_with_tool(bContext *C, const char gpen static bool gpencil_stroke_vertexmode_poll_with_tool(bContext *C, const char gpencil_vertex_brush_type) { - bGPdata *gpd = CTX_data_gpencil_data(C); + const bGPdata *gpd = CTX_data_gpencil_data(C); if (!gpd) { return false; } - ToolSettings *ts = CTX_data_tool_settings(C); + const ToolSettings *ts = CTX_data_tool_settings(C); if (!ts || !ts->gp_vertexpaint) { return false; } - Brush *brush = BKE_paint_brush(&ts->gp_vertexpaint->paint); + const Brush *brush = BKE_paint_brush(&ts->gp_vertexpaint->paint); return ((gpd->flag & GP_DATA_STROKE_VERTEXMODE) && (brush && brush->gpencil_settings) && WM_toolsystem_active_tool_is_brush(C) && (brush->gpencil_vertex_brush_type == gpencil_vertex_brush_type)); @@ -105,17 +105,17 @@ static bool gpencil_stroke_vertexmode_poll_with_tool(bContext *C, static bool gpencil_stroke_sculptmode_poll_with_tool(bContext *C, const char gpencil_sculpt_brush_type) { - bGPdata *gpd = CTX_data_gpencil_data(C); + const bGPdata *gpd = CTX_data_gpencil_data(C); if (!gpd) { return false; } - ToolSettings *ts = CTX_data_tool_settings(C); + const ToolSettings *ts = CTX_data_tool_settings(C); if (!ts || !ts->gp_sculptpaint) { return false; } - Brush *brush = BKE_paint_brush(&ts->gp_sculptpaint->paint); + const Brush *brush = BKE_paint_brush(&ts->gp_sculptpaint->paint); return ((gpd->flag & GP_DATA_STROKE_SCULPTMODE) && (brush && brush->gpencil_settings) && WM_toolsystem_active_tool_is_brush(C) && (brush->gpencil_sculpt_brush_type == gpencil_sculpt_brush_type)); @@ -124,17 +124,17 @@ static bool gpencil_stroke_sculptmode_poll_with_tool(bContext *C, static bool gpencil_stroke_weightmode_poll_with_tool(bContext *C, const char gpencil_weight_brush_type) { - bGPdata *gpd = CTX_data_gpencil_data(C); + const bGPdata *gpd = CTX_data_gpencil_data(C); if (!gpd) { return false; } - ToolSettings *ts = CTX_data_tool_settings(C); + const ToolSettings *ts = CTX_data_tool_settings(C); if (!ts || !ts->gp_weightpaint) { return false; } - Brush *brush = BKE_paint_brush(&ts->gp_weightpaint->paint); + const Brush *brush = BKE_paint_brush(&ts->gp_weightpaint->paint); return ((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) && (brush && brush->gpencil_settings) && WM_toolsystem_active_tool_is_brush(C) && (brush->gpencil_weight_brush_type == gpencil_weight_brush_type)); diff --git a/source/blender/editors/interface/templates/interface_templates.cc b/source/blender/editors/interface/templates/interface_templates.cc index 94943f4427d..9be52e8241f 100644 --- a/source/blender/editors/interface/templates/interface_templates.cc +++ b/source/blender/editors/interface/templates/interface_templates.cc @@ -2235,7 +2235,8 @@ static void template_search_buttons(const bContext *C, { uiBlock *block = uiLayoutGetBlock(layout); uiRNACollectionSearch *search_data = &template_search.search_data; - StructRNA *type = RNA_property_pointer_type(&search_data->target_ptr, search_data->target_prop); + const StructRNA *type = RNA_property_pointer_type(&search_data->target_ptr, + search_data->target_prop); const bool editable = RNA_property_editable(&search_data->target_ptr, search_data->target_prop); PointerRNA active_ptr = RNA_property_pointer_get(&search_data->target_ptr, search_data->target_prop); @@ -6444,7 +6445,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) UI_block_emboss_set(block, previous_emboss); } -static bool uiTemplateInputStatusAzone(uiLayout *layout, AZone *az, ARegion *region) +static bool uiTemplateInputStatusAzone(uiLayout *layout, const AZone *az, const ARegion *region) { if (az->type == AZONE_AREA) { uiItemL(layout, nullptr, ICON_MOUSE_LMB_DRAG); diff --git a/source/blender/editors/screen/screen_draw.cc b/source/blender/editors/screen/screen_draw.cc index 8e726a6641d..24091a64e7a 100644 --- a/source/blender/editors/screen/screen_draw.cc +++ b/source/blender/editors/screen/screen_draw.cc @@ -223,7 +223,7 @@ void ED_screen_draw_edges(wmWindow *win) } } -static void screen_draw_area_drag_tip(int x, int y, ScrArea *source, const std::string &hint) +static void screen_draw_area_drag_tip(int x, int y, const ScrArea *source, const std::string &hint) { if (!U.experimental.use_docking) { return; diff --git a/source/blender/editors/screen/screen_edit.cc b/source/blender/editors/screen/screen_edit.cc index 9a105cd1691..dad8fa278aa 100644 --- a/source/blender/editors/screen/screen_edit.cc +++ b/source/blender/editors/screen/screen_edit.cc @@ -683,7 +683,7 @@ static bool region_poll(const bContext *C, /** * \return true if any region polling state changed, and a screen refresh is needed. */ -static bool screen_regions_poll(bContext *C, wmWindow *win, bScreen *screen) +static bool screen_regions_poll(bContext *C, wmWindow *win, const bScreen *screen) { wmWindow *prev_win = CTX_wm_window(C); ScrArea *prev_area = CTX_wm_area(C); diff --git a/source/blender/editors/space_view3d/view3d_edit.cc b/source/blender/editors/space_view3d/view3d_edit.cc index 732bef857e2..64dd64e1402 100644 --- a/source/blender/editors/space_view3d/view3d_edit.cc +++ b/source/blender/editors/space_view3d/view3d_edit.cc @@ -271,7 +271,7 @@ static int render_border_exec(bContext *C, wmOperator *op) /* calculate range */ if (rv3d->persp == RV3D_CAMOB) { - Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); + const Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); ED_view3d_calc_camera_border(scene, depsgraph, region, v3d, rv3d, &vb, false); } else { diff --git a/source/blender/editors/space_view3d/view3d_navigate_view_zoom.cc b/source/blender/editors/space_view3d/view3d_navigate_view_zoom.cc index 83a0b0d3ddf..3ddcc625bcb 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_view_zoom.cc +++ b/source/blender/editors/space_view3d/view3d_navigate_view_zoom.cc @@ -57,7 +57,7 @@ void viewzoom_modal_keymap(wmKeyConfig *keyconf) * (coords compatible w/ #wmEvent.xy). Use when not nullptr. */ static void view_zoom_to_window_xy_camera(Scene *scene, - Depsgraph *depsgraph, + const Depsgraph *depsgraph, View3D *v3d, ARegion *region, float dfac, diff --git a/source/blender/editors/undo/ed_undo.cc b/source/blender/editors/undo/ed_undo.cc index eecc8a9c56c..71caf3b0380 100644 --- a/source/blender/editors/undo/ed_undo.cc +++ b/source/blender/editors/undo/ed_undo.cc @@ -872,7 +872,7 @@ void ED_undo_object_editmode_restore_helper(Scene *scene, ((ID *)obedit->data)->tag &= ~ID_TAG_DOIT; } for (Base *base : bases) { - ID *id = static_cast(base->object->data); + const ID *id = static_cast(base->object->data); if (id->tag & ID_TAG_DOIT) { object::editmode_exit_ex(bmain, scene, base->object, object::EM_FREEDATA); /* Ideally we would know the selection state it was before entering edit-mode, diff --git a/source/blender/imbuf/intern/cineon/logImageCore.cc b/source/blender/imbuf/intern/cineon/logImageCore.cc index e1f54f3bf3b..3f964e8c4ab 100644 --- a/source/blender/imbuf/intern/cineon/logImageCore.cc +++ b/source/blender/imbuf/intern/cineon/logImageCore.cc @@ -1433,7 +1433,7 @@ static int convertABGR_RGBA(const float *src, static int convertCbYCr_RGBA(const float *src, float *dst, - LogImageFile *logImage, + const LogImageFile *logImage, const LogImageElement &logElement) { uint i; @@ -1465,7 +1465,7 @@ static int convertCbYCr_RGBA(const float *src, static int convertCbYCrA_RGBA(const float *src, float *dst, - LogImageFile *logImage, + const LogImageFile *logImage, const LogImageElement &logElement) { uint i; @@ -1498,7 +1498,7 @@ static int convertCbYCrA_RGBA(const float *src, static int convertCbYCrY_RGBA(const float *src, float *dst, - LogImageFile *logImage, + const LogImageFile *logImage, const LogImageElement &logElement) { uint i; @@ -1550,7 +1550,7 @@ static int convertCbYCrY_RGBA(const float *src, static int convertCbYACrYA_RGBA(const float *src, float *dst, - LogImageFile *logImage, + const LogImageFile *logImage, const LogImageElement &logElement) { uint i; @@ -1604,7 +1604,7 @@ static int convertCbYACrYA_RGBA(const float *src, static int convertLuminance_RGBA(const float *src, float *dst, - LogImageFile *logImage, + const LogImageFile *logImage, const LogImageElement &logElement) { uint i; @@ -1630,7 +1630,7 @@ static int convertLuminance_RGBA(const float *src, static int convertYA_RGBA(const float *src, float *dst, - LogImageFile *logImage, + const LogImageFile *logImage, const LogImageElement &logElement) { uint i; diff --git a/source/blender/makesrna/intern/rna_pose_api.cc b/source/blender/makesrna/intern/rna_pose_api.cc index 02578ca48ad..382fec7db23 100644 --- a/source/blender/makesrna/intern/rna_pose_api.cc +++ b/source/blender/makesrna/intern/rna_pose_api.cc @@ -226,24 +226,24 @@ void RNA_api_pose(StructRNA *srna) "pose of selected bones, or all bones if none are selected."); parm = RNA_def_pointer(func, "action", "Action", "Action", "The Action containing the pose"); RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED); - parm = RNA_def_float(func, - "blend_factor", - 1.0f, - 0.0f, - 1.0f, - "Blend Factor", - "How much the given Action affects the final pose", - 0.0f, - 1.0f); - parm = RNA_def_float(func, - "evaluation_time", - 0.0f, - -FLT_MAX, - FLT_MAX, - "Evaluation Time", - "Time at which the given action is evaluated to obtain the pose", - -FLT_MAX, - FLT_MAX); + RNA_def_float(func, + "blend_factor", + 1.0f, + 0.0f, + 1.0f, + "Blend Factor", + "How much the given Action affects the final pose", + 0.0f, + 1.0f); + RNA_def_float(func, + "evaluation_time", + 0.0f, + -FLT_MAX, + FLT_MAX, + "Evaluation Time", + "Time at which the given action is evaluated to obtain the pose", + -FLT_MAX, + FLT_MAX); func = RNA_def_function(srna, "backup_create", "rna_Pose_backup_create"); RNA_def_function_ui_description( diff --git a/source/blender/python/intern/bpy_rna.cc b/source/blender/python/intern/bpy_rna.cc index dfd22d9aeb9..7364de8a766 100644 --- a/source/blender/python/intern/bpy_rna.cc +++ b/source/blender/python/intern/bpy_rna.cc @@ -90,7 +90,7 @@ BPy_StructRNA *bpy_context_module = nullptr; /* for fast access */ -static PyObject *pyrna_struct_CreatePyObject_from_type(PointerRNA *ptr, +static PyObject *pyrna_struct_CreatePyObject_from_type(const PointerRNA *ptr, PyTypeObject *tp, void **instance); @@ -7624,7 +7624,7 @@ static PyObject *pyrna_struct_Subtype(PointerRNA *ptr) * A lower level version of #pyrna_struct_CreatePyObject, * use this when type (`tp`) needs to be set to a non-standard value. */ -static PyObject *pyrna_struct_CreatePyObject_from_type(PointerRNA *ptr, +static PyObject *pyrna_struct_CreatePyObject_from_type(const PointerRNA *ptr, PyTypeObject *tp, void **instance) { diff --git a/source/blender/sequencer/intern/effects.cc b/source/blender/sequencer/intern/effects.cc index d0d2171ac31..0e0b0863bb1 100644 --- a/source/blender/sequencer/intern/effects.cc +++ b/source/blender/sequencer/intern/effects.cc @@ -2230,7 +2230,7 @@ static ImBuf *do_speed_effect(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2) { - SpeedControlVars *s = (SpeedControlVars *)seq->effectdata; + const SpeedControlVars *s = (SpeedControlVars *)seq->effectdata; SeqEffectHandle cross_effect = get_sequence_effect_impl(SEQ_TYPE_CROSS); ImBuf *out; diff --git a/source/blender/sequencer/intern/image_cache.cc b/source/blender/sequencer/intern/image_cache.cc index 0c5fd5914bd..e4f16ef7689 100644 --- a/source/blender/sequencer/intern/image_cache.cc +++ b/source/blender/sequencer/intern/image_cache.cc @@ -122,10 +122,10 @@ static bool seq_cache_hashcmp(const void *a_, const void *b_) seq_cmp_render_data(&a->context, &b->context)); } -static float seq_cache_timeline_frame_to_frame_index(Scene *scene, +static float seq_cache_timeline_frame_to_frame_index(const Scene *scene, const Sequence *seq, - float timeline_frame, - int type) + const float timeline_frame, + const int type) { /* With raw images, map timeline_frame to strip input media frame range. This means that static * images or extended frame range of movies will only generate one cache entry. No special diff --git a/source/blender/sequencer/intern/modifier.cc b/source/blender/sequencer/intern/modifier.cc index 844e5c11bf4..3703f8c6826 100644 --- a/source/blender/sequencer/intern/modifier.cc +++ b/source/blender/sequencer/intern/modifier.cc @@ -360,7 +360,7 @@ static void color_balance_byte(const float cb_tab[3][CB_TABLE_SIZE], int height) { uchar *ptr = rect; - uchar *ptr_end = ptr + int64_t(width) * height * 4; + const uchar *ptr_end = ptr + int64_t(width) * height * 4; const uchar *mask_ptr = mask_rect; if (mask_ptr != nullptr) { @@ -975,7 +975,7 @@ static void brightcontrast_apply(const StripScreenQuad & /*quad*/, ImBuf *ibuf, ImBuf *mask) { - BrightContrastModifierData *bcmd = (BrightContrastModifierData *)smd; + const BrightContrastModifierData *bcmd = (BrightContrastModifierData *)smd; BrightContrastThreadData data; data.bright = bcmd->bright; diff --git a/source/blender/sequencer/intern/thumbnail_cache.cc b/source/blender/sequencer/intern/thumbnail_cache.cc index 98545f1a02a..dfc8f83cb58 100644 --- a/source/blender/sequencer/intern/thumbnail_cache.cc +++ b/source/blender/sequencer/intern/thumbnail_cache.cc @@ -204,7 +204,7 @@ static void image_size_to_thumb_size(int &r_width, int &r_height) } } -static ImBuf *make_thumb_for_image(Scene *scene, const ThumbnailCache::Request &request) +static ImBuf *make_thumb_for_image(const Scene *scene, const ThumbnailCache::Request &request) { ImBuf *ibuf = IMB_thumb_load_image( request.file_path.c_str(), SEQ_THUMB_SIZE, nullptr, IMBThumbLoadFlags::LoadLargeFiles); diff --git a/source/blender/windowmanager/WM_api.hh b/source/blender/windowmanager/WM_api.hh index c11d23e8abc..4f5375c69b5 100644 --- a/source/blender/windowmanager/WM_api.hh +++ b/source/blender/windowmanager/WM_api.hh @@ -1538,7 +1538,7 @@ std::string WM_drag_get_string_firstline(const wmDrag *drag); /* Set OpenGL viewport and scissor. */ void wmViewport(const rcti *winrct); void wmPartialViewport(rcti *drawrct, const rcti *winrct, const rcti *partialrct); -void wmWindowViewport(wmWindow *win); +void wmWindowViewport(const wmWindow *win); /* OpenGL utilities with safety check. */ void wmOrtho2(float x1, float x2, float y1, float y2); diff --git a/source/blender/windowmanager/intern/wm_playanim.cc b/source/blender/windowmanager/intern/wm_playanim.cc index a7b5df87fd3..131b0ca9f70 100644 --- a/source/blender/windowmanager/intern/wm_playanim.cc +++ b/source/blender/windowmanager/intern/wm_playanim.cc @@ -1919,7 +1919,7 @@ static bool wm_main_playanim_intern(int argc, const char **argv, PlayArgs *args_ #ifdef WITH_AUDASPACE g_audaspace.source = AUD_Sound_file(filepath); if (!BLI_listbase_is_empty(&ps.picsbase)) { - ImBufAnim *anim_movie = static_cast(ps.picsbase.first)->anim; + const ImBufAnim *anim_movie = static_cast(ps.picsbase.first)->anim; if (anim_movie) { short frs_sec = 25; float frs_sec_base = 1.0; diff --git a/source/blender/windowmanager/intern/wm_subwindow.cc b/source/blender/windowmanager/intern/wm_subwindow.cc index 4a37512fcdb..c587e6c7120 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.cc +++ b/source/blender/windowmanager/intern/wm_subwindow.cc @@ -71,7 +71,7 @@ void wmPartialViewport(rcti *drawrct, const rcti *winrct, const rcti *partialrct GPU_matrix_identity_set(); } -void wmWindowViewport(wmWindow *win) +void wmWindowViewport(const wmWindow *win) { int width = WM_window_native_pixel_x(win); int height = WM_window_native_pixel_y(win);