diff --git a/intern/ghost/intern/GHOST_DisplayManager.cc b/intern/ghost/intern/GHOST_DisplayManager.cc index 62a6334b63c..88dd1d8c251 100644 --- a/intern/ghost/intern/GHOST_DisplayManager.cc +++ b/intern/ghost/intern/GHOST_DisplayManager.cc @@ -97,8 +97,12 @@ GHOST_TSuccess GHOST_DisplayManager::findMatch(uint8_t display, GHOST_ASSERT(m_settingsInitialized, "GHOST_DisplayManager::findMatch(): m_settingsInitialized=false"); - int criteria[4] = { - int(setting.xPixels), int(setting.yPixels), int(setting.bpp), int(setting.frequency)}; + const int criteria[4] = { + int(setting.xPixels), + int(setting.yPixels), + int(setting.bpp), + int(setting.frequency), + }; int capabilities[4]; double field, score; double best = 1e12; /* A big number. */ diff --git a/source/blender/blenkernel/intern/curve_deform.c b/source/blender/blenkernel/intern/curve_deform.c index b2e51871122..9caf079b1ed 100644 --- a/source/blender/blenkernel/intern/curve_deform.c +++ b/source/blender/blenkernel/intern/curve_deform.c @@ -62,7 +62,7 @@ static void init_curve_deform(const Object *ob_curve, const Object *ob_target, C static bool calc_curve_deform( const Object *ob_curve, float co[3], const short axis, const CurveDeform *cd, float r_quat[4]) { - Curve *cu = ob_curve->data; + const Curve *cu = ob_curve->data; float fac, loc[4], dir[3], new_quat[4], radius; short index; const bool is_neg_axis = (axis > 2); diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c index fde97ecca5c..1e677e10942 100644 --- a/source/blender/blenkernel/intern/lib_query.c +++ b/source/blender/blenkernel/intern/lib_query.c @@ -722,7 +722,7 @@ static bool lib_query_unused_ids_tag_recurse(Main *bmain, if (ELEM(GS(id->name), ID_IM)) { /* Images which have a 'viewer' source (e.g. render results) should not be considered as * orphaned/unused data. */ - Image *image = (Image *)id; + const Image *image = (Image *)id; if (image->source == IMA_SRC_VIEWER) { id_relations->tags |= MAINIDRELATIONS_ENTRY_TAGS_PROCESSED; return false; diff --git a/source/blender/datatoc/datatoc_icon.c b/source/blender/datatoc/datatoc_icon.c index 74c076f0604..969aac59825 100644 --- a/source/blender/datatoc/datatoc_icon.c +++ b/source/blender/datatoc/datatoc_icon.c @@ -345,7 +345,7 @@ static bool icon_merge(struct IconMergeContext *context, return false; } - struct IconInfo *read_icon_info = icon_merge_context_info_for_icon_head(context, &head); + const struct IconInfo *read_icon_info = icon_merge_context_info_for_icon_head(context, &head); if (read_icon_info != NULL) { printf( "Conflicting icon files %s and %s\n", path_basename(file_src), read_icon_info->file_name); diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.cc b/source/blender/editors/space_sequencer/sequencer_scopes.cc index 0b19188302c..7087f7c1c20 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.cc +++ b/source/blender/editors/space_sequencer/sequencer_scopes.cc @@ -429,7 +429,7 @@ static void make_histogram_view_from_ibuf_byte_fn(void *__restrict userdata, const int y, const TaskParallelTLS *__restrict tls) { - MakeHistogramViewData *data = static_cast(userdata); + const MakeHistogramViewData *data = static_cast(userdata); const ImBuf *ibuf = data->ibuf; const uchar *src = ibuf->byte_buffer.data; diff --git a/source/blender/makesrna/intern/rna_workspace_api.cc b/source/blender/makesrna/intern/rna_workspace_api.cc index 9bf7fd38707..f3ab52ffdf8 100644 --- a/source/blender/makesrna/intern/rna_workspace_api.cc +++ b/source/blender/makesrna/intern/rna_workspace_api.cc @@ -122,7 +122,7 @@ void RNA_api_workspace_tool(StructRNA *srna) PropertyRNA *parm; FunctionRNA *func; - static EnumPropertyItem options_items[] = { + static const EnumPropertyItem options_items[] = { {TOOLREF_FLAG_FALLBACK_KEYMAP, "KEYMAP_FALLBACK", 0, "Fallback", ""}, {0, nullptr, 0, nullptr, nullptr}, }; diff --git a/source/blender/sequencer/intern/animation.c b/source/blender/sequencer/intern/animation.c index 141580ecc4a..1cdb187ec12 100644 --- a/source/blender/sequencer/intern/animation.c +++ b/source/blender/sequencer/intern/animation.c @@ -151,7 +151,7 @@ static void seq_animation_duplicate(Scene *scene, Sequence *seq, ListBase *dst, return; } - GSET_FOREACH_BEGIN (FCurve *, fcu, fcurves) { + GSET_FOREACH_BEGIN (const FCurve *, fcu, fcurves) { FCurve *fcu_cpy = BKE_fcurve_copy(fcu); BLI_addtail(dst, fcu_cpy); } diff --git a/source/blender/sequencer/intern/sound.c b/source/blender/sequencer/intern/sound.c index 54a440f1c4e..cc42aa1eb40 100644 --- a/source/blender/sequencer/intern/sound.c +++ b/source/blender/sequencer/intern/sound.c @@ -139,7 +139,7 @@ void SEQ_sound_update(Scene *scene, bSound *sound) float SEQ_sound_pitch_get(const Scene *scene, const Sequence *seq) { - Sequence *meta_parent = seq_sequence_lookup_meta_by_seq(scene, seq); + const Sequence *meta_parent = seq_sequence_lookup_meta_by_seq(scene, seq); if (meta_parent != NULL) { return seq->speed_factor * SEQ_sound_pitch_get(scene, meta_parent); } diff --git a/source/blender/sequencer/intern/strip_select.c b/source/blender/sequencer/intern/strip_select.c index c1a88e4bc46..4a610cedc39 100644 --- a/source/blender/sequencer/intern/strip_select.c +++ b/source/blender/sequencer/intern/strip_select.c @@ -18,7 +18,7 @@ Sequence *SEQ_select_active_get(Scene *scene) { - Editing *ed = SEQ_editing_get(scene); + const Editing *ed = SEQ_editing_get(scene); if (ed == NULL) { return NULL; diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c index 4e96719992d..8131834283d 100644 --- a/source/blender/sequencer/intern/strip_transform.c +++ b/source/blender/sequencer/intern/strip_transform.c @@ -613,7 +613,7 @@ void SEQ_transform_offset_after_frame(Scene *scene, bool SEQ_transform_is_locked(ListBase *channels, Sequence *seq) { - SeqTimelineChannel *channel = SEQ_channel_get_by_index(channels, seq->machine); + const SeqTimelineChannel *channel = SEQ_channel_get_by_index(channels, seq->machine); return seq->flag & SEQ_LOCK || (SEQ_channel_is_locked(channel) && ((seq->flag & SEQ_IGNORE_CHANNEL_LOCK) == 0)); } @@ -636,7 +636,7 @@ void SEQ_image_transform_origin_offset_pixelspace_get(const Scene *scene, float r_origin[2]) { float image_size[2]; - StripElem *strip_elem = seq->strip->stripdata; + const StripElem *strip_elem = seq->strip->stripdata; if (strip_elem == NULL) { image_size[0] = scene->r.xsch; image_size[1] = scene->r.ysch; @@ -663,7 +663,7 @@ static void seq_image_transform_quad_get_ex(const Scene *scene, float r_quad[4][2]) { StripTransform *transform = seq->strip->transform; - StripCrop *crop = seq->strip->crop; + const StripCrop *crop = seq->strip->crop; int image_size[2] = {scene->r.xsch, scene->r.ysch}; if (ELEM(seq->type, SEQ_TYPE_MOVIE, SEQ_TYPE_IMAGE)) {