Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed Nov 8, 2023
1 parent b9c59ea commit 0ca1a29
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
16 changes: 8 additions & 8 deletions modules/gin_dsp/dsp/gin_platereverb.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ template <class F, class I> class PlateReverb
// Scale the taps
for (I i = 0; i < kNumTaps; i++)
{
leftTaps[i] = baseLeftTaps[i] * sizeRatio;
rightTaps[i] = baseRightTaps[i] * sizeRatio;
leftTaps[size_t (i)] = baseLeftTaps[size_t (i)] * sizeRatio;
rightTaps[size_t (i)] = baseRightTaps[size_t (i)] * sizeRatio;
}
}

Expand Down Expand Up @@ -316,8 +316,8 @@ template <class F, class I> class PlateReverb

// For speed, create a bigger buffer than we really need.
I bufferSize = ceilPowerOfTwo (size);
buffer.reset (new F[bufferSize]);
std::memset (buffer.get(), 0, bufferSize * sizeof(F));
buffer.reset (new F[size_t (bufferSize)]);
std::memset (buffer.get(), 0, size_t (bufferSize) * sizeof(F));

mask = bufferSize - 1;

Expand All @@ -328,7 +328,7 @@ template <class F, class I> class PlateReverb

inline void push(F val)
{
buffer[writeIdx++] = val;
buffer[size_t (writeIdx++)] = val;
writeIdx &= mask;
}

Expand All @@ -342,8 +342,8 @@ template <class F, class I> class PlateReverb
F frac = 1 - (delay - d);

I readIdx = (writeIdx - 1) - d;
F a = buffer[(readIdx - 1) & mask];
F b = buffer[readIdx & mask];
F a = buffer[size_t ((readIdx - 1) & mask)];
F b = buffer[size_t (readIdx & mask)];

return a + (b - a) * frac;
}
Expand All @@ -358,7 +358,7 @@ template <class F, class I> class PlateReverb

void reset()
{
std::memset (buffer.get(), 0, ceilPowerOfTwo (size) * sizeof (F));
std::memset (buffer.get(), 0, size_t (ceilPowerOfTwo (size)) * sizeof (F));
writeIdx = 0;
}

Expand Down
1 change: 1 addition & 0 deletions modules/gin_plugin/components/gin_scaledplugineditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ScaledPluginEditor : public juce::AudioProcessorEditor

~ScaledPluginEditor() override
{
processor.editorBeingDeleted (this);
setLookAndFeel (nullptr);
}

Expand Down
8 changes: 4 additions & 4 deletions modules/gin_simd/gin_simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,14 @@

#include <juce_core/juce_core.h>

namespace gin
{

JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE("-Wimplicit-float-conversion",
"-Wunused-parameter",
"-Wshadow",
"-Wzero-length-array",
"-Wcast-align",
"-Wimplicit-int-conversion",
"-Warray-parameter")
"-Warray-parameter",
"-Wsign-conversion")

#if JUCE_INTEL
#ifndef __SSE__
Expand All @@ -80,5 +78,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE("-Wimplicit-float-conversion",

JUCE_END_IGNORE_WARNINGS_GCC_LIKE

namespace gin
{
#include "math/gin_math.h"
}

0 comments on commit 0ca1a29

Please sign in to comment.