Browse Source

Fixed some issues flagged by the Xcode static analysis tool

tags/2021-05-28
ed 5 years ago
parent
commit
c1cb7cea9a
3 changed files with 6 additions and 2 deletions
  1. +4
    -1
      examples/BLOCKS/BlocksMonitorDemo.h
  2. +1
    -1
      examples/BLOCKS/BlocksSynthDemo.h
  3. +1
    -0
      modules/juce_audio_processors/processors/juce_AudioProcessor.cpp

+ 4
- 1
examples/BLOCKS/BlocksMonitorDemo.h View File

@@ -645,7 +645,7 @@ public:
auto numBlockComponents = blockComponents.size();
// If there are no currently connected Blocks then display some text on the screen
if (numBlockComponents == 0)
if (masterBlockComponent == nullptr || numBlockComponents == 0)
{
noBlocksLabel.setVisible (true);
noBlocksLabel.setBounds (0, (getHeight() / 2) - 50, getWidth(), 100);
@@ -795,6 +795,9 @@ private:
/** Calculates the position and rotation of each connected Block relative to the master Block */
void positionBlocks (BlockTopology topology)
{
if (masterBlockComponent == nullptr)
return;
Array<BlockComponent*> blocksConnectedToMaster;
auto maxDelta = std::numeric_limits<float>::max();


+ 1
- 1
examples/BLOCKS/BlocksSynthDemo.h View File

@@ -411,7 +411,7 @@ public:
}
else
{
if (squareWaveY[x - 1] == 1)
if (x > 0 && squareWaveY[x - 1] == 1)
squareWaveY[x - 1] = 255;
squareWaveY[x] = 13;


+ 1
- 0
modules/juce_audio_processors/processors/juce_AudioProcessor.cpp View File

@@ -364,6 +364,7 @@ void AudioProcessor::setPlayConfigDetails (int newNumIns, int newNumOuts, double
jassert (success && newNumIns == getTotalNumInputChannels() && newNumOuts == getTotalNumOutputChannels());
setRateAndBufferSizeDetails (newSampleRate, newBlockSize);
ignoreUnused (success);
}
void AudioProcessor::setRateAndBufferSizeDetails (double newSampleRate, int newBlockSize) noexcept


Loading…
Cancel
Save