Skip to content

Commit be10960

Browse files
committed
See? What did I tell you? (Warning fixes)
1 parent ed68fdb commit be10960

File tree

7 files changed

+26
-27
lines changed

7 files changed

+26
-27
lines changed

Plateau2/Plateau2.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,35 +102,35 @@ Plateau2::Plateau2(const InstanceInfo& info)
102102
pGraphics->AttachControl(Knobs[i]);
103103
Knobs[i]->Hide(true);
104104
}
105-
NextButtonControl = new NavigatorButton(IRECT::MakeXYWH(220.572, 125.695, 82.306, 30), [this, PageBackgrounds, NextButtons, PrevButtons](IControl* pCaller) {
105+
NextButtonControl = new NavigatorButton(IRECT::MakeXYWH(220.572f, 125.695f, 82.306f, 30.f), [this, PageBackgrounds, NextButtons, PrevButtons](IControl* pCaller) {
106106
ChangePage(1, PageBackgrounds, NextButtons, PrevButtons);
107107
}, pGraphics->LoadSVG(NEXTEXTRAS_FN));
108108
pGraphics->AttachControl(NextButtonControl);
109109

110-
float LEDScale = 0.2453054f;
110+
double LEDScale = 0.2453054f;
111111

112112
const ISVG LedOffSVG = pGraphics->LoadSVG(LEDOFF_FN);
113113
const ISVG LedOn1SVG = pGraphics->LoadSVG(LEDON1_FN);
114114
const ISVG LedOn2SVG = pGraphics->LoadSVG(LEDON2_FN);
115115
const ISVG LedOnBothSVG = pGraphics->LoadSVG(LEDONBOTH_FN);
116116

117-
Switches[0] = new LEDSwitch(IRECT::MakeXYWH(-24+12.474, 470-65.198-45, 102, 102), LEDScale, LedOffSVG, LedOnBothSVG, LedOnBothSVG, kFreeze, kFreeze);
118-
Switches[1] = new LEDSwitch(IRECT::MakeXYWH(-24+12.474, 470-65.198+30, 102, 102), LEDScale, LedOffSVG, LedOn1SVG, LedOn2SVG, kFreeze1, kFreeze2);
117+
Switches[0] = new LEDSwitch(IRECT::MakeXYWH(-11.526f, 404.802f-45, 102, 102), LEDScale, LedOffSVG, LedOnBothSVG, LedOnBothSVG, kFreeze, kFreeze);
118+
Switches[1] = new LEDSwitch(IRECT::MakeXYWH(-11.526f, 404.802f+30, 102, 102), LEDScale, LedOffSVG, LedOn1SVG, LedOn2SVG, kFreeze1, kFreeze2);
119119
Switches[2] = new LEDSwitch(IRECT::MakeXYWH(-14, 216, 102, 102), LEDScale, LedOffSVG, LedOn1SVG, LedOn2SVG, kTunedMode1, kTunedMode2);
120120
Switches[3] = new LEDSwitch(IRECT::MakeXYWH(228, 216, 102, 102), LEDScale, LedOffSVG, LedOn1SVG, LedOn2SVG, kDiffuseInput1, kDiffuseInput2);
121121

122-
LEDButton* clearButton = new LEDButton(IRECT::MakeXYWH(238 - 12.474, 470 - 65.198 + 30, 102, 102), LEDScale, LedOffSVG, LedOn1SVG, LedOn2SVG, [this](IControl* clearControl) {SetParameterValue(kClear1, 1);});
122+
LEDButton* clearButton = new LEDButton(IRECT::MakeXYWH(225.526f, 404.802f + 30, 102, 102), LEDScale, LedOffSVG, LedOn1SVG, LedOn2SVG, [this](IControl* clearControl) {SetParameterValue(kClear1, 1);});
123123

124124
Buttons[0] = clearButton;
125125

126-
Buttons[1] = new LEDButton(IRECT::MakeXYWH(238 - 12.474, 470 - 65.198 - 45, 102, 102), LEDScale, LedOffSVG, LedOnBothSVG, LedOnBothSVG, [this, clearButton](IControl* clearControl) {SetParameterValue(kClear, 1);clearButton->SetValue(1.);clearButton->SetDirty();}, clearButton);
126+
Buttons[1] = new LEDButton(IRECT::MakeXYWH(225.526f, 404.802f - 45, 102, 102), LEDScale, LedOffSVG, LedOnBothSVG, LedOnBothSVG, [this, clearButton](IControl* clearControl) {SetParameterValue(kClear, 1);clearButton->SetValue(1.);clearButton->SetDirty();}, clearButton);
127127

128128
for (int i = 0; i < kNumButtons; i++) {
129129
pGraphics->AttachControl(Buttons[i]);
130130
}
131131

132132
//Tank Enable Button
133-
Switches[4] = new LEDSwitch(IRECT::MakeXYWH(106.5, 112, 102, 102), LEDScale, LedOffSVG, LedOn1SVG, LedOn2SVG, kEnable1, kEnable2);
133+
Switches[4] = new LEDSwitch(IRECT::MakeXYWH(106.5f, 112, 102, 102), LEDScale, LedOffSVG, LedOn1SVG, LedOn2SVG, kEnable1, kEnable2);
134134
Switches[4]->SetValue(1);
135135

136136
for (int i = 0; i < kNumSwitches; i++) {
@@ -244,13 +244,13 @@ void Plateau2::OnParamChange(int index)
244244
case kSize1:
245245
case kTunedMode1:
246246
{
247-
float size = GetParam(kSize1)->Value();
247+
double size = GetParam(kSize1)->Value();
248248
bool tunedMode = GetParam(kTunedMode1)->Value();
249249
if (tunedMode) {
250250
reverb1.setTimeScale(0.0025f * powf(2.f, size * 5.f));
251251
}
252252
else {
253-
reverb1.setTimeScale(scale(size * size, 0.f, 1.f, 0.01f, 4.0f));
253+
reverb1.setTimeScale(scale<double>(size * size, 0.f, 1.f, 0.01f, 4.0f));
254254
}
255255
break;
256256
}
@@ -259,7 +259,7 @@ void Plateau2::OnParamChange(int index)
259259
break;
260260
case kDecay1:
261261
{
262-
float decay = GetParam(index)->Value();
262+
double decay = GetParam(index)->Value();
263263
reverb1.setDecay(2.f * decay - decay * decay);
264264
break;
265265
}
@@ -271,7 +271,7 @@ void Plateau2::OnParamChange(int index)
271271
break;
272272
case kModSpeed1:
273273
{
274-
float modSpeed = GetParam(index)->Value();
274+
double modSpeed = GetParam(index)->Value();
275275
reverb1.setTankModSpeed(modSpeed * modSpeed * 99.f + 1.f);
276276
break;
277277
}
@@ -297,13 +297,13 @@ void Plateau2::OnParamChange(int index)
297297
case kSize2:
298298
case kTunedMode2:
299299
{
300-
float size = GetParam(kSize2)->Value();
300+
double size = GetParam(kSize2)->Value();
301301
bool tunedMode = GetParam(kTunedMode2)->Value();
302302
if (tunedMode) {
303303
reverb2.setTimeScale(0.0025f * powf(2.f, size * 5.f));
304304
}
305305
else {
306-
reverb2.setTimeScale(scale(size * size, 0.f, 1.f, 0.01f, 4.0f));
306+
reverb2.setTimeScale(scale<double>(size * size, 0.f, 1.f, 0.01f, 4.0f));
307307
}
308308
break;
309309
}
@@ -312,7 +312,7 @@ void Plateau2::OnParamChange(int index)
312312
break;
313313
case kDecay2:
314314
{
315-
float decay = GetParam(index)->Value();
315+
double decay = GetParam(index)->Value();
316316
reverb2.setDecay(2.f * decay - decay * decay);
317317
break;
318318
}
@@ -324,7 +324,7 @@ void Plateau2::OnParamChange(int index)
324324
break;
325325
case kModSpeed2:
326326
{
327-
float modSpeed = GetParam(index)->Value();
327+
double modSpeed = GetParam(index)->Value();
328328
reverb2.setTankModSpeed(modSpeed * modSpeed * 99.f + 1.f);
329329
break;
330330
}

Plateau2/Plateau2.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class Plateau2 final : public Plugin
7878
void UpdatePageVisibility();
7979
void OnParamChange(int index) override;
8080
void SelectTank(bool tank2);
81-
void ProcessReverb(sample** inputs, sample** outputs, int nFrames, int nChans, Dattorro& reverb, LinearEnvelope& envelope, bool& clear, bool& cleared, bool& fadeOut, bool& fadeIn, bool& frozen, int kClear, int kFreeze, int kWet);
8281
#endif
8382
private:
8483
Dattorro reverb1;

Plateau2/controls/LEDButton.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BEGIN_IGRAPHICS_NAMESPACE
66
class LEDButton : public IButtonControlBase
77
{
88
public:
9-
LEDButton(const IRECT& bounds, float hitboxScaleFactor, const ISVG& svgOff, const ISVG& svgOn1, const ISVG& svgOn2, IActionFunction aF, IControl* linkedControl = nullptr)
9+
LEDButton(const IRECT& bounds, double hitboxScaleFactor, const ISVG& svgOff, const ISVG& svgOn1, const ISVG& svgOn2, IActionFunction aF, IControl* linkedControl = nullptr)
1010
: IButtonControlBase(bounds, aF)
1111
, mSVGOff(svgOff)
1212
, mSVGOn1(svgOn1)
@@ -38,7 +38,7 @@ class LEDButton : public IButtonControlBase
3838
SetDirty(false);
3939
}
4040

41-
float hitboxScale = 1.0f;
41+
double hitboxScale = 1.0f;
4242
protected:
4343
ISVG mSVGOff;
4444
ISVG mSVGOn1;

Plateau2/controls/LEDRadio.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BEGIN_IGRAPHICS_NAMESPACE
66
class LEDRadio : public IButtonControlBase
77
{
88
public:
9-
LEDRadio(const IRECT& bounds, float hitboxScaleFactor, const ISVG& svgOff, const ISVG& svgOn, IActionFunction aF)
9+
LEDRadio(const IRECT& bounds, double hitboxScaleFactor, const ISVG& svgOff, const ISVG& svgOn, IActionFunction aF)
1010
: IButtonControlBase(bounds, aF)
1111
, mSVGOff(svgOff)
1212
, mSVGOn(svgOn)
@@ -45,7 +45,7 @@ class LEDRadio : public IButtonControlBase
4545
}
4646
}
4747

48-
float hitboxScale = 1.0f;
48+
double hitboxScale = 1.0f;
4949
protected:
5050
ISVG mSVGOff;
5151
ISVG mSVGOn;

Plateau2/controls/LEDSwitch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class LEDSwitch : public ISwitchControlBase
1111
* @param bounds The control's bounds
1212
* @param bitmap The bitmap resource for the control
1313
* @param paramIdx The parameter index to link this control to */
14-
LEDSwitch(const IRECT& bounds, float hitboxScaleFactor, const ISVG& svgOff, const ISVG& svgOn1, const ISVG& svgOn2, int param1Idx = kNoParameter, int param2Idx = kNoParameter)
14+
LEDSwitch(const IRECT& bounds, double hitboxScaleFactor, const ISVG& svgOff, const ISVG& svgOn1, const ISVG& svgOn2, int param1Idx = kNoParameter, int param2Idx = kNoParameter)
1515
: ISwitchControlBase(bounds, param1Idx, nullptr, 3)
1616
, mSVGOff(svgOff)
1717
, mSVGOn1(svgOn1)
@@ -50,7 +50,7 @@ class LEDSwitch : public ISwitchControlBase
5050
SetParamIdx(tank2 ? mParam2Idx : mParam1Idx, 0, true);
5151
}
5252

53-
float hitboxScale = 1.0f;
53+
double hitboxScale = 1.0f;
5454

5555
void Update() {
5656
SetValue(tank2 ? preferedState2 : preferedState1);

Plateau2/dsp/Dattorro.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ class Dattorro {
190190

191191
private:
192192
double preDelayTime = 0.0;
193-
static constexpr long kInApf1Time = 141;
194-
static constexpr long kInApf2Time = 107;
195-
static constexpr long kInApf3Time = 379;
196-
static constexpr long kInApf4Time = 277;
193+
static constexpr double kInApf1Time = 141;
194+
static constexpr double kInApf2Time = 107;
195+
static constexpr double kInApf3Time = 379;
196+
static constexpr double kInApf4Time = 277;
197197

198198
static constexpr double dattorroSampleRate = 29761.0;
199199
double sampleRate = 44100.0;

iPlug2

0 commit comments

Comments
 (0)