diff --git a/source/blender/animrig/ANIM_action.hh b/source/blender/animrig/ANIM_action.hh index 3b6889e0e02..492442f9a98 100644 --- a/source/blender/animrig/ANIM_action.hh +++ b/source/blender/animrig/ANIM_action.hh @@ -949,7 +949,7 @@ void assert_baklava_phase_1_invariants(const Strip &strip); * Creates a new `Action` that matches the old action but is converted to have layers. * Returns a nullptr if the action is empty or already layered. */ -Action *convert_to_layered_action(Main &bmain, const Action &action); +Action *convert_to_layered_action(Main &bmain, const Action &legacy_action); /** * Deselect the keys of all actions in the Span. Duplicate entries are only visited once. diff --git a/source/blender/blenfont/intern/blf_glyph.cc b/source/blender/blenfont/intern/blf_glyph.cc index 4848edbee34..3938f3813e2 100644 --- a/source/blender/blenfont/intern/blf_glyph.cc +++ b/source/blender/blenfont/intern/blf_glyph.cc @@ -84,7 +84,7 @@ static float from_16dot16(FT_Fixed value) static GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font) { - for (std::unique_ptr &gc : font->cache) { + for (const std::unique_ptr &gc : font->cache) { if (gc->size == font->size && (gc->bold == ((font->flags & BLF_BOLD) != 0)) && (gc->italic == ((font->flags & BLF_ITALIC) != 0)) && (gc->char_weight == font->char_weight) && (gc->char_slant == font->char_slant) && diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h index 6ea97833baf..8753a58159a 100644 --- a/source/blender/blenkernel/BKE_camera.h +++ b/source/blender/blenkernel/BKE_camera.h @@ -90,7 +90,7 @@ void BKE_camera_params_compute_viewplane( /** * Crop `viewplane` given the current resolution and a pixel region inside the view plane. */ -void BKE_camera_params_crop_viewplane(rctf *viewplane, int winx, int winy, rcti *region); +void BKE_camera_params_crop_viewplane(rctf *viewplane, int winx, int winy, const rcti *region); /** * View-plane is assumed to be already computed. */ diff --git a/source/blender/blenkernel/BKE_lib_id.hh b/source/blender/blenkernel/BKE_lib_id.hh index 99a9fcb63a1..0a123fee8e6 100644 --- a/source/blender/blenkernel/BKE_lib_id.hh +++ b/source/blender/blenkernel/BKE_lib_id.hh @@ -341,12 +341,12 @@ void BKE_libblock_free_data_py(ID *id); * \param bmain: #Main database containing the freed #ID, * can be NULL in case it's a temp ID outside of any #Main. * \param idv: Pointer to ID to be freed. - * \param flag: Set of \a LIB_ID_FREE_... flags controlling/overriding usual freeing process, + * \param flag_orig: Set of \a LIB_ID_FREE_... flags controlling/overriding usual freeing process, * 0 to get default safe behavior. * \param use_flag_from_idtag: Still use freeing info flags from given #ID data-block, * even if some overriding ones are passed in \a flag parameter. */ -void BKE_id_free_ex(Main *bmain, void *idv, int flag, bool use_flag_from_idtag); +void BKE_id_free_ex(Main *bmain, void *idv, int flag_orig, bool use_flag_from_idtag); /** * Complete ID freeing, should be usable in most cases (even for out-of-Main IDs). * diff --git a/source/blender/blenkernel/intern/camera.cc b/source/blender/blenkernel/intern/camera.cc index 4ba363f0d3c..d55089bffce 100644 --- a/source/blender/blenkernel/intern/camera.cc +++ b/source/blender/blenkernel/intern/camera.cc @@ -485,7 +485,7 @@ void BKE_camera_params_compute_viewplane( params->viewplane = viewplane; } -void BKE_camera_params_crop_viewplane(rctf *viewplane, int winx, int winy, rcti *region) +void BKE_camera_params_crop_viewplane(rctf *viewplane, int winx, int winy, const rcti *region) { float pix_size_x = BLI_rctf_size_x(viewplane) / winx; float pix_size_y = BLI_rctf_size_y(viewplane) / winy; diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index aa4f9233429..56bb21ad579 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -4974,7 +4974,7 @@ blender::ImplicitSharingInfoAndData blo_read_shared_impl( if (BLO_read_data_is_undo(reader)) { if (reader->fd->flags & FD_FLAGS_IS_MEMFILE) { UndoReader *undo_reader = reinterpret_cast(reader->fd->file); - MemFile &memfile = *undo_reader->memfile; + const MemFile &memfile = *undo_reader->memfile; if (memfile.shared_storage) { /* Check if the data was saved with sharing-info. */ if (const blender::ImplicitSharingInfo *sharing_info = diff --git a/source/blender/editors/animation/keyframing.cc b/source/blender/editors/animation/keyframing.cc index e6150a805ee..3e019e97433 100644 --- a/source/blender/editors/animation/keyframing.cc +++ b/source/blender/editors/animation/keyframing.cc @@ -879,7 +879,6 @@ static int delete_key_v3d_without_keying_set(bContext *C, wmOperator *op) if ((ob->adt) && (ob->adt->action)) { AnimData *adt = ob->adt; bAction *act = adt->action; - FCurve *fcu, *fcn; const float cfra_unmap = BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP); Action &action = act->wrap(); @@ -892,7 +891,8 @@ static int delete_key_v3d_without_keying_set(bContext *C, wmOperator *op) } } else { - for (fcu = static_cast(act->curves.first); fcu; fcu = fcn) { + FCurve *fcn; + for (FCurve *fcu = static_cast(act->curves.first); fcu; fcu = fcn) { fcn = fcu->next; if (!can_delete_key(fcu, ob, op->reports)) { continue; diff --git a/source/blender/editors/screen/screen_draw.cc b/source/blender/editors/screen/screen_draw.cc index 7603db4a49d..9f7b5897722 100644 --- a/source/blender/editors/screen/screen_draw.cc +++ b/source/blender/editors/screen/screen_draw.cc @@ -237,12 +237,19 @@ static void screen_draw_area_icon( if (bg_color) { const float bg_width = UI_SCALE_FAC * 50.0f; const float bg_height = UI_SCALE_FAC * 40.0f; - rctf rect = {center_x - (bg_width / 2.0f), - center_x + bg_width - (bg_width / 2.0f), - center_y - (bg_height / 2.0f), - center_y + bg_height - (bg_height / 2.0f)}; - UI_draw_roundbox_4fv_ex( - &rect, bg_color, nullptr, 1.0f, outline ? outline : nullptr, U.pixelsize, 6 * U.pixelsize); + const rctf bg_rect = { + /*xmin*/ center_x - (bg_width / 2.0f), + /*xmax*/ center_x + bg_width - (bg_width / 2.0f), + /*ymin*/ center_y - (bg_height / 2.0f), + /*ymax*/ center_y + bg_height - (bg_height / 2.0f), + }; + UI_draw_roundbox_4fv_ex(&bg_rect, + bg_color, + nullptr, + 1.0f, + outline ? outline : nullptr, + U.pixelsize, + 6 * U.pixelsize); } const float icon_size = 32.0f * UI_SCALE_FAC; diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp index 1b25eca3cf9..7d04b4a9c39 100644 --- a/source/blender/io/collada/AnimationImporter.cpp +++ b/source/blender/io/collada/AnimationImporter.cpp @@ -406,8 +406,8 @@ void AnimationImporter::Assign_transform_animations( fcurve_deg_to_rad(fcu); } } - COLLADAFW::Rotate *rot = (COLLADAFW::Rotate *)transform; - COLLADABU::Math::Vector3 &axis = rot->getRotationAxis(); + const COLLADAFW::Rotate *rot = (COLLADAFW::Rotate *)transform; + const COLLADABU::Math::Vector3 &axis = rot->getRotationAxis(); switch (binding->animationClass) { case COLLADAFW::AnimationList::ANGLE: { diff --git a/source/blender/sequencer/intern/strip_retiming.cc b/source/blender/sequencer/intern/strip_retiming.cc index 17c5ff8d284..ee0a738eb7a 100644 --- a/source/blender/sequencer/intern/strip_retiming.cc +++ b/source/blender/sequencer/intern/strip_retiming.cc @@ -1106,7 +1106,7 @@ blender::Map SEQ_retiming_selection_get(const Edit bool SEQ_retiming_selection_contains(const Editing *ed, const SeqRetimingKey *key) { LISTBASE_FOREACH (Sequence *, seq, ed->seqbasep) { - for (SeqRetimingKey &key_iter : SEQ_retiming_keys_get(seq)) { + for (const SeqRetimingKey &key_iter : SEQ_retiming_keys_get(seq)) { if ((key_iter.flag & SEQ_KEY_SELECTED) != 0 && &key_iter == key) { return true; }