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:
authorBrecht Van Lommel <brecht@blender.org>2022-07-15 17:47:07 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-07-15 17:57:04 +0300
commit03aeef64d5c2bd1eb1aa790bddbce728857778f3 (patch)
treebbe83d242f81c5da27928bdc84f2613e19d966a0
parentc505f19efe3f476e1164b455817ad275fa913454 (diff)
Cleanup: compiler warnings
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index b1e13850bf2..eb2e4ef05e5 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -245,7 +245,7 @@ typedef struct WaveVizData {
bool final_sample; /* There are no more samples. */
} WaveVizData;
-static bool seq_draw_waveforms_poll(const bContext *C, SpaceSeq *sseq, Sequence *seq)
+static bool seq_draw_waveforms_poll(const bContext *UNUSED(C), SpaceSeq *sseq, Sequence *seq)
{
const bool strip_is_valid = seq->type == SEQ_TYPE_SOUND_RAM && seq->sound != NULL;
const bool overlays_enabled = (sseq->flag & SEQ_SHOW_OVERLAY) != 0;
@@ -357,7 +357,7 @@ static void draw_waveform(WaveVizData *waveform_data, size_t wave_data_len)
}
}
-static float align_frame_with_pixel(const View2D *v2d, float frame_coord, float frames_per_pixel)
+static float align_frame_with_pixel(float frame_coord, float frames_per_pixel)
{
return round_fl_to_int(frame_coord / frames_per_pixel) * frames_per_pixel;
}
@@ -416,7 +416,7 @@ static void draw_seq_waveform_overlay(
float samples_per_pixel = samples_per_frame * frames_per_pixel;
/* Align strip start with nearest pixel to prevent waveform flickering. */
- const float x1_aligned = align_frame_with_pixel(v2d, x1, frames_per_pixel);
+ const float x1_aligned = align_frame_with_pixel(x1, frames_per_pixel);
/* Offset x1 and x2 values, to match view min/max, if strip is out of bounds. */
const float frame_start = max_ff(v2d->cur.xmin, x1_aligned);
const float frame_end = min_ff(v2d->cur.xmax, x2);
@@ -439,8 +439,8 @@ static void draw_seq_waveform_overlay(
size_t wave_data_len = 0;
/* Offset must be also aligned, otherwise waveform flickers when moving left handle. */
- const float strip_offset = align_frame_with_pixel(
- v2d, seq->startofs + seq->anim_startofs, frames_per_pixel);
+ const float strip_offset = align_frame_with_pixel(seq->startofs + seq->anim_startofs,
+ frames_per_pixel);
float start_sample = strip_offset * samples_per_frame;
start_sample += seq->sound->offset_time * SOUND_WAVE_SAMPLES_PER_SECOND;
/* Add off-screen part of strip to offset. */