commit 0247c580db5e69c66922c2556cdaf362e428ac1d
parent 9fe9182dc4fcbb71218d400af0022bc864073d62
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Mon, 14 Feb 2022 19:58:51 +0100
fix some warnings
Diffstat:
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/source/jucePlugin/PluginProcessor.cpp b/source/jucePlugin/PluginProcessor.cpp
@@ -238,7 +238,7 @@ void AudioPluginAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer,
}
else
{
- const juce::MidiMessage message(&e.sysex[0], e.sysex.size(), 0.0);
+ const juce::MidiMessage message(&e.sysex[0], static_cast<int>(e.sysex.size()), 0.0);
midiMessages.addEvent(message, 0);
// additionally send to the midi output we've selected in the editor
diff --git a/source/jucePlugin/VirusParameter.cpp b/source/jucePlugin/VirusParameter.cpp
@@ -9,9 +9,9 @@ namespace Virus
m_partNum(partNum), juce::RangedAudioParameter(genId(desc, partNum),
"Ch " + juce::String(partNum + 1) + " " + desc.name)
{
- m_range.start = m_desc.range.getStart();
- m_range.end = m_desc.range.getEnd();
- m_range.interval = m_desc.isDiscrete || m_desc.isBool ? 1 : 0;
+ m_range.start = static_cast<float>(m_desc.range.getStart());
+ m_range.end = static_cast<float>(m_desc.range.getEnd());
+ m_range.interval = m_desc.isDiscrete || m_desc.isBool ? 1.0f : 0.0f;
m_value.addListener(this);
}
@@ -34,7 +34,7 @@ namespace Virus
{
m_lastValue = newValue;
if (notifyHost)
- setValueNotifyingHost(convertTo0to1(newValue));
+ setValueNotifyingHost(convertTo0to1(static_cast<float>(newValue)));
else
m_value.setValue(newValue);
}
diff --git a/source/jucePlugin/VirusParameter.h b/source/jucePlugin/VirusParameter.h
@@ -109,7 +109,7 @@ namespace Virus
Controller &m_ctrl;
const Description m_desc;
juce::NormalisableRange<float> m_range;
- uint8_t m_paramNum, m_partNum;
+ uint8_t m_partNum;
int m_lastValue{-1};
juce::Value m_value;
};
diff --git a/source/jucePlugin/VirusParameterBinding.cpp b/source/jucePlugin/VirusParameterBinding.cpp
@@ -65,7 +65,7 @@ void VirusParameterBinding::bind(juce::ComboBox& _combo, Virus::ParameterType _p
_combo.setSelectedId((int)v->getValueObject().getValueSource().getValue() + 1, juce::dontSendNotification);
_combo.onChange = [this, &_combo, v]() {
v->beginChangeGesture();
- v->setValueNotifyingHost(v->convertTo0to1(_combo.getSelectedId()-1));
+ v->setValueNotifyingHost(v->convertTo0to1(static_cast<float>(_combo.getSelectedId() - 1)));
v->endChangeGesture();
v->getValueObject().getValueSource().setValue((int)_combo.getSelectedId() - 1);
};