diff --git a/resources/Delay.h b/resources/Delay.h index c777ca6..8e827e7 100644 --- a/resources/Delay.h +++ b/resources/Delay.h @@ -98,7 +98,7 @@ class Delay : private ProcessorBase { auto abIn = context.getInputBlock(); auto abOut = context.getOutputBlock(); - auto L = abIn.getNumSamples(); + size_t L = abIn.getNumSamples(); auto nCh = jmin((int) spec.numChannels, (int) abIn.getNumChannels()); int startIndex, blockSize1, blockSize2; @@ -139,7 +139,7 @@ class Delay : private ProcessorBase void getReadWritePositions (bool read, int numSamples, int& startIndex, int& blockSize1, int& blockSize2) { const int L = buffer.getNumSamples(); - int pos = writePosition; + size_t pos = writePosition; if (read) { pos = static_cast (static_cast (writePosition) - delayInSamples); @@ -158,8 +158,8 @@ class Delay : private ProcessorBase } else { - startIndex = pos; - blockSize1 = jmin (L - pos, numSamples); + startIndex = static_cast(pos); + blockSize1 = jmin (static_cast(L - pos), numSamples); numSamples -= blockSize1; blockSize2 = numSamples <= 0 ? 0 : numSamples; } @@ -171,6 +171,6 @@ class Delay : private ProcessorBase float delay; unsigned int delayInSamples = 0; bool bypassed = false; - int writePosition = 0; + size_t writePosition = 0; AudioBuffer buffer; }; diff --git a/resources/lookAndFeel/AA_LaF.h b/resources/lookAndFeel/AA_LaF.h index 3acc9e5..af7926e 100644 --- a/resources/lookAndFeel/AA_LaF.h +++ b/resources/lookAndFeel/AA_LaF.h @@ -244,11 +244,11 @@ class LaF : public LookAndFeel_V4 if (! label.isBeingEdited()) { - const float alpha = label.isEnabled() ? 1.0f : 0.5f; + const float editingAlpha = label.isEnabled() ? 1.0f : 0.5f; const Font font (aaRegular); //g.setColour (ClText.withMultipliedAlpha (alpha)); - g.setColour (ClText.withMultipliedAlpha(alpha)); + g.setColour (ClText.withMultipliedAlpha(editingAlpha)); g.setFont (getLabelFont(label)); Rectangle textArea (label.getBorderSize().subtractedFrom (label.getLocalBounds())); @@ -256,7 +256,7 @@ class LaF : public LookAndFeel_V4 g.drawFittedText (label.getText(), textArea, label.getJustificationType(), 1, label.getMinimumHorizontalScale()); - g.setColour (label.findColour (Label::outlineColourId).withMultipliedAlpha (alpha)); + g.setColour (label.findColour (Label::outlineColourId).withMultipliedAlpha (editingAlpha)); } else if (label.isEnabled()) { @@ -275,9 +275,9 @@ class LaF : public LookAndFeel_V4 g.setColour (Colours::white.withMultipliedAlpha(0.5f)); Path triangle; - triangle.startNewSubPath(w, h); - triangle.lineTo(0.5 * w, h); - triangle.lineTo(w, 0.5 * h); + triangle.startNewSubPath(static_cast(w), static_cast(h)); + triangle.lineTo(static_cast(0.5 * w), static_cast(h)); + triangle.lineTo(static_cast(w), static_cast(0.5 * h)); triangle.closeSubPath(); g.fillPath(triangle); @@ -296,7 +296,7 @@ class LaF : public LookAndFeel_V4 else { Path p; - p.addRoundedRectangle(0, 0, width, height, 12.0f); + p.addRoundedRectangle(static_cast(0), static_cast(0), static_cast(width), static_cast(height), 12.0f); //g.setColour (ClTextTextboxbg); g.setColour (textEditor.findColour (TextEditor::backgroundColourId)); g.fillPath (p); @@ -313,13 +313,13 @@ class LaF : public LookAndFeel_V4 if (textEditor.hasKeyboardFocus (true) && ! textEditor.isReadOnly()) { g.setColour (Colours::white.withMultipliedAlpha(0.8f)); - g.drawRoundedRectangle (0.5, 0.5, width-1, height-1, (height-1)/2.0f, 0.8); + g.drawRoundedRectangle (0.5, 0.5, static_cast(width-1), static_cast(height-1), static_cast(height-1)/2.0f, 0.8f); } else { g.setColour (Colours::white.withMultipliedAlpha(0.8f)); - g.drawRoundedRectangle (0, 0, width, height, height/2.0f, 0); + g.drawRoundedRectangle (0, 0, static_cast(width), static_cast(height), static_cast(height)/2.0f, 0); } } } @@ -425,9 +425,9 @@ class LaF : public LookAndFeel_V4 Colour statusColour = slider.findColour(Slider::rotarySliderOutlineColourId).withMultipliedAlpha (0.8f); - const float min = slider.getMinimum(); - const float max = slider.getMaximum(); - const float zeroPos = -min/(max-min); + const double min = slider.getMinimum(); + const double max = slider.getMaximum(); + const auto zeroPos = -min/(max-min); bool isTwoValue = (style == Slider::SliderStyle::TwoValueVertical || style == Slider::SliderStyle::TwoValueHorizontal); if (slider.isHorizontal()) @@ -438,11 +438,15 @@ class LaF : public LookAndFeel_V4 if (isTwoValue) { - clbar.addRoundedRectangle(Rectangle(Point(minSliderPos, iy), Point(maxSliderPos, iy+sliderRadius)),sliderRadius/2.0,sliderRadius/2.0); + clbar.addRoundedRectangle( + Rectangle(Point(minSliderPos, iy), Point(maxSliderPos, iy+sliderRadius)), + sliderRadius/2.0,sliderRadius/2.0); } else { - clbar.addRoundedRectangle(Rectangle(Point(x+width*zeroPos, iy), Point(sliderPos, iy+sliderRadius)),sliderRadius/2.0,sliderRadius/2.0); + clbar.addRoundedRectangle( + Rectangle(Point(x+width*zeroPos, iy), Point(sliderPos, iy+sliderRadius)), + sliderRadius/2.0,sliderRadius/2.0); } } else