Skip to content

Commit

Permalink
Fix clang-14 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed Jun 12, 2022
1 parent 4736ca1 commit 092d731
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/DSP/DJPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ auto DJPlayer::releaseResources() -> void
auto DJPlayer::loadFile(juce::File audioFile) -> LengthAndSamplerate
{
auto sr = 0.0;
auto length = 0;
auto length = std::int64_t{};
auto* reader = _formatManager.createReaderFor(audioFile);

if (reader != nullptr) // good file!
if (reader != nullptr)
{
length = reader->lengthInSamples;
sr = reader->sampleRate;
Expand All @@ -72,7 +72,7 @@ auto DJPlayer::loadFile(juce::File audioFile) -> LengthAndSamplerate
auto DJPlayer::gain(double gain) -> void
{
jassert(juce::isPositiveAndBelow(gain, 4.0));
_transportSource.setGain(gain);
_transportSource.setGain(static_cast<float>(gain));
}
auto DJPlayer::speed(double ratio) -> void
{
Expand Down
2 changes: 1 addition & 1 deletion src/UI/Component/WaveformDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void WaveformDisplay::paint(juce::Graphics& g)
auto x = area.getX() + (area.getWidth() * _position);
auto top = area.getY();
auto bottom = area.getBottom();
g.fillRect(juce::Rectangle<float>(x, top, 3.0f, bottom - top));
g.fillRect(juce::Rectangle<double>(x, top, 3.0, bottom - top).toFloat());
}
}

Expand Down

0 comments on commit 092d731

Please sign in to comment.