Browse Source

Fixed some more Linux compiler warnings

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
a4bd6cbc66
67 changed files with 205 additions and 141 deletions
  1. +3
    -3
      examples/Assets/DSPDemos_Common.h
  2. +1
    -1
      examples/Audio/AudioAppDemo.h
  3. +1
    -1
      examples/Audio/AudioLatencyDemo.h
  4. +2
    -2
      examples/Audio/AudioPlaybackDemo.h
  5. +3
    -3
      examples/Audio/AudioRecordingDemo.h
  6. +1
    -1
      examples/Audio/AudioSettingsDemo.h
  7. +1
    -1
      examples/Audio/AudioSynthesiserDemo.h
  8. +1
    -2
      examples/Audio/MPEDemo.h
  9. +1
    -1
      examples/Audio/MidiDemo.h
  10. +1
    -1
      examples/Audio/PluckedStringsDemo.h
  11. +1
    -1
      examples/Audio/SimpleFFTDemo.h
  12. +1
    -1
      examples/BLOCKS/BlocksDrawingDemo.h
  13. +2
    -2
      examples/BLOCKS/BlocksMonitorDemo.h
  14. +2
    -2
      examples/BLOCKS/BlocksSynthDemo.h
  15. +1
    -1
      examples/DemoRunner/Source/Main.cpp
  16. +1
    -1
      examples/DemoRunner/Source/UI/DemoContentComponent.h
  17. +1
    -1
      examples/DemoRunner/Source/UI/MainComponent.h
  18. +1
    -1
      examples/GUI/BouncingBallWavetableDemo.h
  19. +1
    -1
      examples/GUI/CameraDemo.h
  20. +1
    -1
      examples/GUI/CodeEditorDemo.h
  21. +1
    -1
      examples/GUI/ImagesDemo.h
  22. +1
    -1
      examples/GUI/MDIDemo.h
  23. +2
    -2
      examples/GUI/MenusDemo.h
  24. +1
    -1
      examples/GUI/OpenGLAppDemo.h
  25. +1
    -1
      examples/GUI/OpenGLDemo.h
  26. +1
    -1
      examples/GUI/OpenGLDemo2D.h
  27. +1
    -1
      examples/GUI/VideoDemo.h
  28. +1
    -1
      examples/GUI/WindowsDemo.h
  29. +2
    -2
      examples/Plugins/AudioPluginDemo.h
  30. +1
    -1
      examples/Utilities/Box2DDemo.h
  31. +1
    -1
      examples/Utilities/ChildProcessDemo.h
  32. +2
    -2
      examples/Utilities/MultithreadingDemo.h
  33. +1
    -1
      examples/Utilities/OSCDemo.h
  34. +1
    -1
      examples/Utilities/TimersAndEventsDemo.h
  35. +1
    -1
      examples/Utilities/UnitTestsDemo.h
  36. +1
    -1
      examples/Utilities/ValueTreesDemo.h
  37. +1
    -1
      examples/Utilities/XMLandJSONDemo.h
  38. +1
    -1
      modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp
  39. +2
    -2
      modules/juce_audio_devices/native/juce_linux_ALSA.cpp
  40. +1
    -1
      modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h
  41. +3
    -3
      modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h
  42. +8
    -3
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
  43. +1
    -1
      modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp
  44. +1
    -1
      modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.h
  45. +13
    -7
      modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h
  46. +10
    -5
      modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
  47. +3
    -3
      modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp
  48. +1
    -1
      modules/juce_blocks_basics/topology/internal/juce_ConnectedDeviceGroup.cpp
  49. +1
    -1
      modules/juce_blocks_basics/topology/internal/juce_DepreciatedVersionReader.cpp
  50. +1
    -1
      modules/juce_blocks_basics/topology/internal/juce_Detector.cpp
  51. +1
    -1
      modules/juce_blocks_basics/topology/internal/juce_MidiDeviceConnection.cpp
  52. +1
    -1
      modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.cpp
  53. +1
    -0
      modules/juce_box2d/juce_box2d.cpp
  54. +1
    -1
      modules/juce_core/memory/juce_Memory.h
  55. +1
    -1
      modules/juce_dsp/frequency/juce_Convolution.cpp
  56. +18
    -18
      modules/juce_dsp/native/juce_avx_SIMDNativeOps.h
  57. +17
    -17
      modules/juce_dsp/native/juce_sse_SIMDNativeOps.h
  58. +1
    -1
      modules/juce_events/interprocess/juce_InterprocessConnection.cpp
  59. +1
    -1
      modules/juce_graphics/image_formats/juce_GIFLoader.cpp
  60. +1
    -1
      modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
  61. +40
    -12
      modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp
  62. +1
    -1
      modules/juce_gui_extra/embedding/juce_XEmbedComponent.h
  63. +13
    -0
      modules/juce_gui_extra/juce_gui_extra.cpp
  64. +5
    -2
      modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp
  65. +8
    -4
      modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp
  66. +1
    -1
      modules/juce_osc/osc/juce_OSCReceiver.cpp
  67. +1
    -1
      modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.cpp

+ 3
- 3
examples/Assets/DSPDemos_Common.h View File

@@ -104,7 +104,7 @@ public:
thumbnail.addChangeListener (this);
}
~AudioThumbnailComponent()
~AudioThumbnailComponent() override
{
thumbnail.removeChangeListener (this);
}
@@ -367,7 +367,7 @@ public:
setSize (800, 250);
}
~AudioFileReaderComponent()
~AudioFileReaderComponent() override
{
signalThreadShouldExit();
stop();
@@ -551,7 +551,7 @@ private:
loopButton.getToggleStateValue().referTo (audioFileReader.loopState);
}
~AudioPlayerHeader()
~AudioPlayerHeader() override
{
audioFileReader.playState.removeListener (this);
}


+ 1
- 1
examples/Audio/AudioAppDemo.h View File

@@ -64,7 +64,7 @@ public:
setSize (800, 600);
}
~AudioAppDemo()
~AudioAppDemo() override
{
shutdownAudio();
}


+ 1
- 1
examples/Audio/AudioLatencyDemo.h View File

@@ -345,7 +345,7 @@ public:
setSize (500, 500);
}
~AudioLatencyDemo()
~AudioLatencyDemo() override
{
audioDeviceManager.removeAudioCallback (liveAudioScroller.get());
audioDeviceManager.removeAudioCallback (latencyTester .get());


+ 2
- 2
examples/Audio/AudioPlaybackDemo.h View File

@@ -75,7 +75,7 @@ public:
addAndMakeVisible (currentPositionMarker);
}
~DemoThumbnailComp()
~DemoThumbnailComp() override
{
scrollbar.removeListener (this);
thumbnail.removeChangeListener (this);
@@ -342,7 +342,7 @@ public:
setSize (500, 500);
}
~AudioPlaybackDemo()
~AudioPlaybackDemo() override
{
transportSource .setSource (nullptr);
audioSourcePlayer.setSource (nullptr);


+ 3
- 3
examples/Audio/AudioRecordingDemo.h View File

@@ -64,7 +64,7 @@ public:
backgroundThread.startThread();
}
~AudioRecorder()
~AudioRecorder() override
{
stop();
}
@@ -178,7 +178,7 @@ public:
thumbnail.addChangeListener (this);
}
~RecordingThumbnail()
~RecordingThumbnail() override
{
thumbnail.removeChangeListener (this);
}
@@ -272,7 +272,7 @@ public:
setSize (500, 500);
}
~AudioRecordingDemo()
~AudioRecordingDemo() override
{
audioDeviceManager.removeAudioCallback (&recorder);
audioDeviceManager.removeAudioCallback (&liveAudioScroller);


+ 1
- 1
examples/Audio/AudioSettingsDemo.h View File

@@ -88,7 +88,7 @@ public:
setSize (500, 600);
}
~AudioSettingsDemo()
~AudioSettingsDemo() override
{
audioDeviceManager.removeChangeListener (this);
}


+ 1
- 1
examples/Audio/AudioSynthesiserDemo.h View File

@@ -278,7 +278,7 @@ public:
setSize (640, 480);
}
~AudioSynthesiserDemo()
~AudioSynthesiserDemo() override
{
audioSourcePlayer.setSource (nullptr);
audioDeviceManager.removeMidiInputDeviceCallback ({}, &(synthAudioSource.midiCollector));


+ 1
- 2
examples/Audio/MPEDemo.h View File

@@ -48,7 +48,6 @@
#pragma once
//==============================================================================
class ZoneColourPicker
{
@@ -904,7 +903,7 @@ public:
setSize (880, 720);
}
~MPEDemo()
~MPEDemo() override
{
audioDeviceManager.removeMidiInputDeviceCallback ({}, this);
audioDeviceManager.removeAudioCallback (this);


+ 1
- 1
examples/Audio/MidiDemo.h View File

@@ -116,7 +116,7 @@ public:
startTimer (500);
}
~MidiDemo()
~MidiDemo() override
{
stopTimer();
midiInputs .clear();


+ 1
- 1
examples/Audio/PluckedStringsDemo.h View File

@@ -268,7 +268,7 @@ public:
setAudioChannels (numInputChannels, numOutputChannels);
}
~PluckedStringsDemo()
~PluckedStringsDemo() override
{
shutdownAudio();
}


+ 1
- 1
examples/Audio/SimpleFFTDemo.h View File

@@ -78,7 +78,7 @@ public:
setSize (700, 500);
}
~SimpleFFTDemo()
~SimpleFFTDemo() override
{
shutdownAudio();
}


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

@@ -317,7 +317,7 @@ public:
topologyChanged();
}
~BlocksDrawingDemo()
~BlocksDrawingDemo() override
{
if (activeBlock != nullptr)
detachActiveBlock();


+ 2
- 2
examples/BLOCKS/BlocksMonitorDemo.h View File

@@ -85,7 +85,7 @@ public:
constrainer.setMinimumOnscreenAmounts (50, 50, 50, 50);
}
~BlockComponent()
~BlockComponent() override
{
// Remove any listeners
if (auto touchSurface = block->getTouchSurface())
@@ -609,7 +609,7 @@ public:
topologyChanged();
}
~BlocksMonitorDemo()
~BlocksMonitorDemo() override
{
topologySource.removeListener (this);
}


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

@@ -302,7 +302,7 @@ public:
synthesiser.addSound (new TriangleSound());
}
~Audio()
~Audio() override
{
audioDeviceManager.removeAudioCallback (this);
}
@@ -613,7 +613,7 @@ public:
topologyChanged();
}
~BlocksSynthDemo()
~BlocksSynthDemo() override
{
if (activeBlock != nullptr)
detachActiveBlock();


+ 1
- 1
examples/DemoRunner/Source/Main.cpp View File

@@ -83,7 +83,7 @@ public:
//==============================================================================
DemoRunnerApplication() {}
~DemoRunnerApplication()
~DemoRunnerApplication() override
{
sharedAudioDeviceManager.reset();
}


+ 1
- 1
examples/DemoRunner/Source/UI/DemoContentComponent.h View File

@@ -37,7 +37,7 @@ class DemoContentComponent : public TabbedComponent
{
public:
DemoContentComponent (Component& mainComponent, std::function<void(bool)> demoChangedCallback);
~DemoContentComponent();
~DemoContentComponent() override;
void resized() override;


+ 1
- 1
examples/DemoRunner/Source/UI/MainComponent.h View File

@@ -35,7 +35,7 @@ class MainComponent : public Component
public:
//==============================================================================
MainComponent();
~MainComponent();
~MainComponent() override;
//==============================================================================
void paint (Graphics&) override;


+ 1
- 1
examples/GUI/BouncingBallWavetableDemo.h View File

@@ -70,7 +70,7 @@ public:
startTimerHz (60);
}
~BouncingBallWavetableDemo()
~BouncingBallWavetableDemo() override
{
shutdownAudio();
}


+ 1
- 1
examples/GUI/CameraDemo.h View File

@@ -86,7 +86,7 @@ public:
#endif
}
~CameraDemo()
~CameraDemo() override
{
#if JUCE_IOS || JUCE_ANDROID
setPortraitOrientationEnabled (false);


+ 1
- 1
examples/GUI/CodeEditorDemo.h View File

@@ -83,7 +83,7 @@ public:
setSize (500, 500);
}
~CodeEditorDemo()
~CodeEditorDemo() override
{
fileChooser.removeListener (this);
}


+ 1
- 1
examples/GUI/ImagesDemo.h View File

@@ -82,7 +82,7 @@ public:
setSize (500, 500);
}
~ImagesDemo()
~ImagesDemo() override
{
fileTree.removeListener (this);
}


+ 1
- 1
examples/GUI/MDIDemo.h View File

@@ -140,7 +140,7 @@ class DemoMultiDocumentPanel : public MultiDocumentPanel
public:
DemoMultiDocumentPanel() {}
~DemoMultiDocumentPanel()
~DemoMultiDocumentPanel() override
{
closeAllDocuments (true);
}


+ 2
- 2
examples/GUI/MenusDemo.h View File

@@ -81,7 +81,7 @@ struct BurgerMenuHeader : public Component
addAndMakeVisible (burgerButton);
}
~BurgerMenuHeader()
~BurgerMenuHeader() override
{
sidePanel.showOrHide (false);
}
@@ -167,7 +167,7 @@ public:
setSize (500, 500);
}
~MenusDemo()
~MenusDemo() override
{
#if JUCE_MAC
MenuBarModel::setMacMainMenu (nullptr);


+ 1
- 1
examples/GUI/OpenGLAppDemo.h View File

@@ -63,7 +63,7 @@ public:
setSize (800, 600);
}
~OpenGLAppDemo()
~OpenGLAppDemo() override
{
shutdownOpenGL();
}


+ 1
- 1
examples/GUI/OpenGLDemo.h View File

@@ -760,7 +760,7 @@ public:
setSize (500, 500);
}
~OpenGLDemo()
~OpenGLDemo() override
{
openGLContext.detach();
}


+ 1
- 1
examples/GUI/OpenGLDemo2D.h View File

@@ -87,7 +87,7 @@ public:
setSize (500, 500);
}
~OpenGLDemo2D()
~OpenGLDemo2D() override
{
openGLContext.detach();
shader.reset();


+ 1
- 1
examples/GUI/VideoDemo.h View File

@@ -186,7 +186,7 @@ public:
setSize (500, 500);
}
~VideoDemo()
~VideoDemo() override
{
fileTree.removeListener (this);
}


+ 1
- 1
examples/GUI/WindowsDemo.h View File

@@ -231,7 +231,7 @@ public:
setSize (250, 250);
}
~WindowsDemo()
~WindowsDemo() override
{
if (dialogWindow != nullptr)
{


+ 2
- 2
examples/Plugins/AudioPluginDemo.h View File

@@ -189,7 +189,7 @@ public:
initialiseSynth();
}
~JuceDemoPluginAudioProcessor() {}
~JuceDemoPluginAudioProcessor() override = default;
//==============================================================================
bool isBusesLayoutSupported (const BusesLayout& layouts) const override
@@ -380,7 +380,7 @@ private:
startTimerHz (30);
}
~JuceDemoPluginAudioProcessorEditor() {}
~JuceDemoPluginAudioProcessorEditor() override {}
//==============================================================================
void paint (Graphics& g) override


+ 1
- 1
examples/Utilities/Box2DDemo.h View File

@@ -192,7 +192,7 @@ public:
setSize (500, 500);
}
~Box2DDemo()
~Box2DDemo() override
{
testsListModel.removeChangeListener (this);
}


+ 1
- 1
examples/Utilities/ChildProcessDemo.h View File

@@ -103,7 +103,7 @@ public:
setSize (500, 500);
}
~ChildProcessDemo()
~ChildProcessDemo() override
{
masterProcess.reset();
}


+ 2
- 2
examples/Utilities/MultithreadingDemo.h View File

@@ -141,7 +141,7 @@ public:
startThread (Random::getSystemRandom().nextInt (3) + 3);
}
~DemoThread()
~DemoThread() override
{
// allow the thread 2 seconds to stop cleanly - should be plenty of time.
stopThread (2000);
@@ -234,7 +234,7 @@ public:
setSize (500, 500);
}
~MultithreadingDemo()
~MultithreadingDemo() override
{
pool.removeAllJobs (true, 2000);
}


+ 1
- 1
examples/Utilities/OSCDemo.h View File

@@ -58,7 +58,7 @@ public:
setModel (this);
}
~OSCLogListBox() {}
~OSCLogListBox() override = default;
//==============================================================================
int getNumRows() override


+ 1
- 1
examples/Utilities/TimersAndEventsDemo.h View File

@@ -196,7 +196,7 @@ public:
setSize (600, 600);
}
~TimersAndEventsDemo()
~TimersAndEventsDemo() override
{
for (auto* fc : flashingComponents)
fc->removeChangeListener (this);


+ 1
- 1
examples/Utilities/UnitTestsDemo.h View File

@@ -82,7 +82,7 @@ public:
setSize (500, 500);
}
~UnitTestsDemo()
~UnitTestsDemo() override
{
stopTest();
}


+ 1
- 1
examples/Utilities/ValueTreesDemo.h View File

@@ -203,7 +203,7 @@ public:
setSize (500, 500);
}
~ValueTreesDemo()
~ValueTreesDemo() override
{
tree.setRootItem (nullptr);
}


+ 1
- 1
examples/Utilities/XMLandJSONDemo.h View File

@@ -278,7 +278,7 @@ public:
setSize (500, 500);
}
~XMLandJSONDemo()
~XMLandJSONDemo() override
{
resultsTree.setRootItem (nullptr);
}


+ 1
- 1
modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp View File

@@ -160,7 +160,7 @@ namespace DestinationTestHelpers
startAnalyticsThread (20);
}
~BasicDestination()
~BasicDestination() override
{
stopAnalyticsThread (1000);
}


+ 2
- 2
modules/juce_audio_devices/native/juce_linux_ALSA.cpp View File

@@ -494,7 +494,7 @@ public:
initialiseRatesAndChannels();
}
~ALSAThread()
~ALSAThread() override
{
close();
}
@@ -853,7 +853,7 @@ public:
{
}
~ALSAAudioIODevice()
~ALSAAudioIODevice() override
{
close();
}


+ 1
- 1
modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h View File

@@ -50,7 +50,7 @@ class MP3AudioFormat : public AudioFormat
public:
//==============================================================================
MP3AudioFormat();
~MP3AudioFormat();
~MP3AudioFormat() override;
//==============================================================================
Array<int> getPossibleSampleRates() override;


+ 3
- 3
modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h View File

@@ -109,7 +109,7 @@ public:
startTimer (500);
}
virtual ~StandalonePluginHolder()
virtual ~StandalonePluginHolder() override
{
stopTimer();
@@ -636,7 +636,7 @@ public:
#endif
}
~StandaloneFilterWindow()
~StandaloneFilterWindow() override
{
#if (! JUCE_IOS) && (! JUCE_ANDROID)
if (auto* props = pluginHolder->settings.get())
@@ -753,7 +753,7 @@ private:
inputMutedChanged (shouldShowNotification);
}
~MainContentComponent()
~MainContentComponent() override
{
if (editor != nullptr)
{


+ 8
- 3
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp View File

@@ -75,6 +75,9 @@
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wdeprecated-writable-strings"
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
#endif
#if JUCE_GCC
@@ -223,7 +226,7 @@ struct SharedMessageThread : public Thread
sleep (1);
}
~SharedMessageThread()
~SharedMessageThread() override
{
signalThreadShouldExit();
JUCEApplicationBase::quit();
@@ -383,7 +386,7 @@ public:
activePlugins.add (this);
}
~JuceVSTWrapper()
~JuceVSTWrapper() override
{
JUCE_AUTORELEASEPOOL
{
@@ -1275,7 +1278,7 @@ public:
ignoreUnused (fakeMouseGenerator);
}
~EditorCompWrapper()
~EditorCompWrapper() override
{
deleteAllChildren(); // note that we can't use a std::unique_ptr because the editor may
// have been transferred to another parent which takes over ownership.
@@ -2285,11 +2288,13 @@ private:
bool isProcessing = false, isBypassed = false, hasShutdown = false;
bool firstProcessCallback = true, shouldDeleteEditor = false;
#if JUCE_MAC
#if JUCE_64BIT
bool useNSView = true;
#else
bool useNSView = false;
#endif
#endif
VstTempBuffers<float> floatTempBuffers;
VstTempBuffers<double> doubleTempBuffers;


+ 1
- 1
modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp View File

@@ -152,7 +152,7 @@ public:
--insideLADSPACallback;
}
~LADSPAPluginInstance()
~LADSPAPluginInstance() override
{
const ScopedLock sl (lock);


+ 1
- 1
modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.h View File

@@ -39,7 +39,7 @@ class JUCE_API LADSPAPluginFormat : public AudioPluginFormat
{
public:
LADSPAPluginFormat();
~LADSPAPluginFormat();
~LADSPAPluginFormat() override;
//==============================================================================
String getName() const override { return "LADSPA"; }


+ 13
- 7
modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h View File

@@ -65,14 +65,15 @@ public:
{
ensureSize (numEventsUsed + 1);
Vst2::VstMidiEvent* const e = (Vst2::VstMidiEvent*) (events->events [numEventsUsed]);
void* const ptr = (Vst2::VstMidiEvent*) (events->events [numEventsUsed]);
auto* const e = (Vst2::VstMidiEvent*) ptr;
events->numEvents = ++numEventsUsed;
if (numBytes <= 4)
{
if (e->type == Vst2::kVstSysExType)
{
delete[] (((Vst2::VstMidiSysexEvent*) e)->sysexDump);
delete[] (((Vst2::VstMidiSysexEvent*) ptr)->sysexDump);
e->type = Vst2::kVstMidiType;
e->byteSize = sizeof (Vst2::VstMidiEvent);
e->noteLength = 0;
@@ -86,7 +87,7 @@ public:
}
else
{
Vst2::VstMidiSysexEvent* const se = (Vst2::VstMidiSysexEvent*) e;
auto* const se = (Vst2::VstMidiSysexEvent*) ptr;
if (se->type == Vst2::kVstSysExType)
delete[] se->sysexDump;
@@ -115,15 +116,18 @@ public:
if (e != nullptr)
{
const void* const ptr = events->events[i];
if (e->type == Vst2::kVstMidiType)
{
dest.addEvent ((const juce::uint8*) ((const Vst2::VstMidiEvent*) e)->midiData,
dest.addEvent ((const juce::uint8*) ((const Vst2::VstMidiEvent*) ptr)->midiData,
4, e->deltaFrames);
}
else if (e->type == Vst2::kVstSysExType)
{
dest.addEvent ((const juce::uint8*) ((const Vst2::VstMidiSysexEvent*) e)->sysexDump,
(int) ((const Vst2::VstMidiSysexEvent*) e)->dumpBytes,
const auto* se = (const Vst2::VstMidiSysexEvent*) ptr;
dest.addEvent ((const juce::uint8*) se->sysexDump,
(int) se->dumpBytes,
e->deltaFrames);
}
}
@@ -182,7 +186,9 @@ private:
static void freeVSTEvent (Vst2::VstEvent* e)
{
if (e->type == Vst2::kVstSysExType)
delete[] (((Vst2::VstMidiSysexEvent*) e)->sysexDump);
{
delete[] (reinterpret_cast<Vst2::VstMidiSysexEvent*> (e)->sysexDump);
}
std::free (e);
}


+ 10
- 5
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -36,9 +36,11 @@
#define __cdecl
#endif
#if JUCE_CLANG && __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#if JUCE_CLANG
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
#endif
#if JUCE_GCC
@@ -67,8 +69,10 @@ namespace Vst2
#pragma warning (disable: 4355) // ("this" used in initialiser list warning)
#endif
#if JUCE_CLANG && __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic pop
#if JUCE_CLANG
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic pop
#endif
#endif
#if JUCE_GCC
@@ -2769,6 +2773,7 @@ public:
#if JUCE_LINUX
pluginWindow = None;
display = XWindowSystem::getInstance()->displayRef();
ignoreUnused (pluginRefusesToResize, alreadyInside);
#elif JUCE_MAC
ignoreUnused (recursiveResize, pluginRefusesToResize, alreadyInside);


+ 3
- 3
modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp View File

@@ -61,7 +61,7 @@ public:
updateMidiConnectionListener();
}
~BlockImplementation()
~BlockImplementation() override
{
markDisconnected();
}
@@ -757,7 +757,7 @@ public:
activateTouchSurface();
}
~TouchSurfaceImplementation()
~TouchSurfaceImplementation() override
{
disableTouchSurface();
}
@@ -875,7 +875,7 @@ public:
{
}
~ControlButtonImplementation()
~ControlButtonImplementation() override
{
}


+ 1
- 1
modules/juce_blocks_basics/topology/internal/juce_ConnectedDeviceGroup.cpp View File

@@ -53,7 +53,7 @@ struct ConnectedDeviceGroup : private AsyncUpdater,
sendTopologyRequest();
}
~ConnectedDeviceGroup()
~ConnectedDeviceGroup() override
{
for (const auto& device : currentDeviceInfo)
detector.handleDeviceRemoved (device);


+ 1
- 1
modules/juce_blocks_basics/topology/internal/juce_DepreciatedVersionReader.cpp View File

@@ -40,7 +40,7 @@ public:
}
//==============================================================================
~DepreciatedVersionReader()
~DepreciatedVersionReader() override
{
deviceConnection.removeListener (this);
}


+ 1
- 1
modules/juce_blocks_basics/topology/internal/juce_Detector.cpp View File

@@ -41,7 +41,7 @@ struct Detector : public ReferenceCountedObject,
startTimer (10);
}
~Detector()
~Detector() override
{
jassert (activeTopologySources.isEmpty());
}


+ 1
- 1
modules/juce_blocks_basics/topology/internal/juce_MidiDeviceConnection.cpp View File

@@ -28,7 +28,7 @@ struct MIDIDeviceConnection : public PhysicalTopologySource::DeviceConnection,
{
MIDIDeviceConnection() {}
~MIDIDeviceConnection()
~MIDIDeviceConnection() override
{
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED


+ 1
- 1
modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.cpp View File

@@ -31,7 +31,7 @@ struct RuleBasedTopologySource::Internal : public TopologySource::Listener,
detector.addListener (this);
}
~Internal()
~Internal() override
{
detector.removeListener (this);
}


+ 1
- 0
modules/juce_box2d/juce_box2d.cpp View File

@@ -39,6 +39,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wsign-conversion"
#pragma clang diagnostic ignored "-Wfloat-conversion"
#pragma clang diagnostic ignored "-Wcast-align"
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif


+ 1
- 1
modules/juce_core/memory/juce_Memory.h View File

@@ -44,7 +44,7 @@ inline void deleteAndZero (Type& pointer) { delete poi
a specific number of bytes,
*/
template <typename Type, typename IntegerType>
inline Type* addBytesToPointer (Type* basePointer, IntegerType bytes) noexcept { return (Type*) (const_cast<char*> (reinterpret_cast<const char*> (basePointer)) + bytes); }
inline Type* addBytesToPointer (Type* basePointer, IntegerType bytes) noexcept { return reinterpret_cast<Type*> (const_cast<char*> (reinterpret_cast<const char*> (basePointer)) + bytes); }
/** A handy function to round up a pointer to the nearest multiple of a given number of bytes.
alignmentBytes must be a power of two. */


+ 1
- 1
modules/juce_dsp/frequency/juce_Convolution.cpp View File

@@ -373,7 +373,7 @@ struct Convolution::Pimpl : private Thread
impulseResponse.setSize (2, static_cast<int> (maximumTimeInSamples), false, false, true);
}
~Pimpl()
~Pimpl() override
{
stopThread (10000);
}


+ 18
- 18
modules/juce_dsp/native/juce_avx_SIMDNativeOps.h View File

@@ -72,7 +72,7 @@ struct SIMDNativeOps<float>
//==============================================================================
static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const float* a) noexcept { return load (a); }
static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return _mm256_castsi256_ps (_mm256_load_si256 ((const __m256i*) a)); }
static forcedinline __m256 JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return _mm256_castsi256_ps (_mm256_load_si256 (reinterpret_cast <const __m256i*> (a))); }
static forcedinline __m256 JUCE_VECTOR_CALLTYPE expand (float s) noexcept { return _mm256_broadcast_ss (&s); }
static forcedinline __m256 JUCE_VECTOR_CALLTYPE load (const float* a) noexcept { return _mm256_load_ps (a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256 value, float* dest) noexcept { _mm256_store_ps (dest, value); }
@@ -144,7 +144,7 @@ struct SIMDNativeOps<double>
//==============================================================================
static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept { return load (a); }
static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return _mm256_castsi256_pd (_mm256_load_si256 ((const __m256i*) a)); }
static forcedinline __m256d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return _mm256_castsi256_pd (_mm256_load_si256 (reinterpret_cast <const __m256i*> (a))); }
static forcedinline __m256d JUCE_VECTOR_CALLTYPE expand (double s) noexcept { return _mm256_broadcast_sd (&s); }
static forcedinline __m256d JUCE_VECTOR_CALLTYPE load (const double* a) noexcept { return _mm256_load_pd (a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256d value, double* dest) noexcept { _mm256_store_pd (dest, value); }
@@ -208,8 +208,8 @@ struct SIMDNativeOps<int8_t>
DECLARE_AVX_SIMD_CONST (int8_t, kAllBitsSet);
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int8_t s) noexcept { return _mm256_set1_epi8 (s); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int8_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int8_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int8_t* p) noexcept { return _mm256_load_si256 (reinterpret_cast<const __m256i*> (p)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int8_t* dest) noexcept { _mm256_store_si256 (reinterpret_cast<__m256i*> (dest), value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi8 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi8 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }
@@ -284,8 +284,8 @@ struct SIMDNativeOps<uint8_t>
static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, load (kHighBit)); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint8_t s) noexcept { return _mm256_set1_epi8 ((int8_t) s); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint8_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint8_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint8_t* p) noexcept { return _mm256_load_si256 (reinterpret_cast<const __m256i*> (p)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint8_t* dest) noexcept { _mm256_store_si256 (reinterpret_cast<__m256i*> (dest), value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi8 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi8 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }
@@ -359,8 +359,8 @@ struct SIMDNativeOps<int16_t>
//==============================================================================
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int16_t s) noexcept { return _mm256_set1_epi16 (s); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int16_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int16_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int16_t* p) noexcept { return _mm256_load_si256 (reinterpret_cast<const __m256i*> (p)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int16_t* dest) noexcept { _mm256_store_si256 (reinterpret_cast<__m256i*> (dest), value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi16 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi16 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi16 (a, b); }
@@ -417,8 +417,8 @@ struct SIMDNativeOps<uint16_t>
//==============================================================================
static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, load (kHighBit)); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept { return _mm256_set1_epi16 ((int16_t) s); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint16_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint16_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint16_t* p) noexcept { return _mm256_load_si256 (reinterpret_cast<const __m256i*> (p)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint16_t* dest) noexcept { _mm256_store_si256 (reinterpret_cast<__m256i*> (dest), value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi16 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi16 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi16 (a, b); }
@@ -474,8 +474,8 @@ struct SIMDNativeOps<int32_t>
//==============================================================================
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int32_t s) noexcept { return _mm256_set1_epi32 (s); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int32_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int32_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int32_t* p) noexcept { return _mm256_load_si256 (reinterpret_cast<const __m256i*> (p)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int32_t* dest) noexcept { _mm256_store_si256 (reinterpret_cast<__m256i*> (dest), value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi32 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi32 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi32 (a, b); }
@@ -530,8 +530,8 @@ struct SIMDNativeOps<uint32_t>
//==============================================================================
static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, load (kHighBit)); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept { return _mm256_set1_epi32 ((int32_t) s); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint32_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint32_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint32_t* p) noexcept { return _mm256_load_si256 (reinterpret_cast<const __m256i*> (p)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint32_t* dest) noexcept { _mm256_store_si256 (reinterpret_cast<__m256i*> (dest), value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi32 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi32 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE mul (__m256i a, __m256i b) noexcept { return _mm256_mullo_epi32 (a, b); }
@@ -584,8 +584,8 @@ struct SIMDNativeOps<int64_t>
DECLARE_AVX_SIMD_CONST (int64_t, kAllBitsSet);
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept { return _mm256_set1_epi64x ((int64_t) s); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int64_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int64_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const int64_t* p) noexcept { return _mm256_load_si256 (reinterpret_cast<const __m256i*> (p)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, int64_t* dest) noexcept { _mm256_store_si256 (reinterpret_cast<__m256i*> (dest), value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi64 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi64 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE bit_and (__m256i a, __m256i b) noexcept { return _mm256_and_si256 (a, b); }
@@ -624,8 +624,8 @@ struct SIMDNativeOps<uint64_t>
DECLARE_AVX_SIMD_CONST (uint64_t, kHighBit);
static forcedinline __m256i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept { return _mm256_set1_epi64x ((int64_t) s); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint64_t* p) noexcept { return _mm256_load_si256 ((const __m256i*) p); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint64_t* dest) noexcept { _mm256_store_si256 ((__m256i*) dest, value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE load (const uint64_t* p) noexcept { return _mm256_load_si256 (reinterpret_cast<const __m256i*> (p)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m256i value, uint64_t* dest) noexcept { _mm256_store_si256 (reinterpret_cast<__m256i*> (dest), value); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE ssign (__m256i a) noexcept { return _mm256_xor_si256 (a, load (kHighBit)); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE add (__m256i a, __m256i b) noexcept { return _mm256_add_epi64 (a, b); }
static forcedinline __m256i JUCE_VECTOR_CALLTYPE sub (__m256i a, __m256i b) noexcept { return _mm256_sub_epi64 (a, b); }


+ 17
- 17
modules/juce_dsp/native/juce_sse_SIMDNativeOps.h View File

@@ -139,7 +139,7 @@ struct SIMDNativeOps<double>
//==============================================================================
static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const double* a) noexcept { return load (a); }
static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return _mm_castsi128_pd (_mm_load_si128 ((const __m128i*) a)); }
static forcedinline __m128d JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return _mm_castsi128_pd (_mm_load_si128 (reinterpret_cast<const __m128i*> (a))); }
static forcedinline __m128d JUCE_VECTOR_CALLTYPE expand (double s) noexcept { return _mm_load1_pd (&s); }
static forcedinline __m128d JUCE_VECTOR_CALLTYPE load (const double* a) noexcept { return _mm_load_pd (a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128d value, double* dest) noexcept { _mm_store_pd (dest, value); }
@@ -203,8 +203,8 @@ struct SIMDNativeOps<int8_t>
DECLARE_SSE_SIMD_CONST (int8_t, kAllBitsSet);
static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int8_t* a) noexcept { return load (a); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int8_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int8_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int8_t* a) noexcept { return _mm_load_si128 (reinterpret_cast<const __m128i*> (a)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int8_t* p) noexcept { _mm_store_si128 (reinterpret_cast<__m128i*> (p), v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int8_t s) noexcept { return _mm_set1_epi8 (s); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi8 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi8 (a, b); }
@@ -277,8 +277,8 @@ struct SIMDNativeOps<uint8_t>
static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint8_t* a) noexcept { return load (a); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint8_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint8_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint8_t* a) noexcept { return _mm_load_si128 (reinterpret_cast<const __m128i*> (a)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint8_t* p) noexcept { _mm_store_si128 (reinterpret_cast<__m128i*> (p), v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint8_t s) noexcept { return _mm_set1_epi8 ((int8_t) s); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi8 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi8 (a, b); }
@@ -346,8 +346,8 @@ struct SIMDNativeOps<int16_t>
//==============================================================================
static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int16_t* a) noexcept { return load (a); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int16_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int16_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int16_t* a) noexcept { return _mm_load_si128 (reinterpret_cast<const __m128i*> (a)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int16_t* p) noexcept { _mm_store_si128 (reinterpret_cast<__m128i*> (p), v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int16_t s) noexcept { return _mm_set1_epi16 (s); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi16 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi16 (a, b); }
@@ -402,8 +402,8 @@ struct SIMDNativeOps<uint16_t>
//==============================================================================
static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint16_t* a) noexcept { return load (a); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint16_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint16_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint16_t* a) noexcept { return _mm_load_si128 (reinterpret_cast<const __m128i*> (a)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint16_t* p) noexcept { _mm_store_si128 (reinterpret_cast<__m128i*> (p), v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint16_t s) noexcept { return _mm_set1_epi16 ((int16_t) s); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi16 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi16 (a, b); }
@@ -461,8 +461,8 @@ struct SIMDNativeOps<int32_t>
//==============================================================================
static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int32_t* a) noexcept { return load (a); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int32_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int32_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int32_t* a) noexcept { return _mm_load_si128 (reinterpret_cast<const __m128i*> (a)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int32_t* p) noexcept { _mm_store_si128 (reinterpret_cast<__m128i*> (p), v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int32_t s) noexcept { return _mm_set1_epi32 (s); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi32 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi32 (a, b); }
@@ -543,8 +543,8 @@ struct SIMDNativeOps<uint32_t>
//==============================================================================
static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint32_t* a) noexcept { return load (a); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint32_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint32_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint32_t* a) noexcept { return _mm_load_si128 (reinterpret_cast<const __m128i*> (a)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint32_t* p) noexcept { _mm_store_si128 (reinterpret_cast<__m128i*> (p), v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint32_t s) noexcept { return _mm_set1_epi32 ((int32_t) s); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi32 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi32 (a, b); }
@@ -623,8 +623,8 @@ struct SIMDNativeOps<int64_t>
static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const int64_t* a) noexcept { return load (a); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (int64_t s) noexcept { return _mm_set1_epi64x (s); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int64_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int64_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const int64_t* a) noexcept { return _mm_load_si128 (reinterpret_cast<const __m128i*> (a)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, int64_t* p) noexcept { _mm_store_si128 (reinterpret_cast<__m128i*> (p), v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi64 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi64 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }
@@ -683,8 +683,8 @@ struct SIMDNativeOps<uint64_t>
static forcedinline __m128i JUCE_VECTOR_CALLTYPE vconst (const uint64_t* a) noexcept { return load (a); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE expand (uint64_t s) noexcept { return _mm_set1_epi64x ((int64_t) s); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE ssign (__m128i a) noexcept { return _mm_xor_si128 (a, vconst (kHighBit)); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint64_t* a) noexcept { return _mm_load_si128 ((const __m128i*) a); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint64_t* p) noexcept { _mm_store_si128 ((__m128i*) p, v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE load (const uint64_t* a) noexcept { return _mm_load_si128 (reinterpret_cast<const __m128i*> (a)); }
static forcedinline void JUCE_VECTOR_CALLTYPE store (__m128i v, uint64_t* p) noexcept { _mm_store_si128 (reinterpret_cast<__m128i*> (p), v); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE add (__m128i a, __m128i b) noexcept { return _mm_add_epi64 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE sub (__m128i a, __m128i b) noexcept { return _mm_sub_epi64 (a, b); }
static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_and (__m128i a, __m128i b) noexcept { return _mm_and_si128 (a, b); }


+ 1
- 1
modules/juce_events/interprocess/juce_InterprocessConnection.cpp View File

@@ -290,7 +290,7 @@ bool InterprocessConnection::readNextMessage()
uint32 messageHeader[2];
auto bytes = readData (messageHeader, sizeof (messageHeader));
if (bytes == sizeof (messageHeader)
if (bytes == (int) sizeof (messageHeader)
&& ByteOrder::swapIfBigEndian (messageHeader[0]) == magicMessageHeader)
{
auto bytesInMessage = (int) ByteOrder::swapIfBigEndian (messageHeader[1]);


+ 1
- 1
modules/juce_graphics/image_formats/juce_GIFLoader.cpp View File

@@ -426,7 +426,7 @@ bool GIFImageFormat::canUnderstand (InputStream& in)
{
char header [4];
return (in.read (header, sizeof (header)) == sizeof (header))
return (in.read (header, sizeof (header)) == (int) sizeof (header))
&& header[0] == 'G'
&& header[1] == 'I'
&& header[2] == 'F';


+ 1
- 1
modules/juce_gui_basics/native/juce_linux_FileChooser.cpp View File

@@ -58,7 +58,7 @@ public:
addZenityArgs();
}
~Native()
~Native() override
{
finish (true);
}


+ 40
- 12
modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp View File

@@ -594,7 +594,7 @@ public:
}
}
~XBitmapImage()
~XBitmapImage() override
{
ScopedXLock xlock (display);
@@ -1070,16 +1070,16 @@ public:
{
ScopedXDisplay xDisplay;
if (auto display = xDisplay.display)
if (auto d = xDisplay.display)
{
Window root, child;
int x, y, winx, winy;
unsigned int mask;
int mouseMods = 0;
ScopedXLock xlock (display);
ScopedXLock xlock (d);
if (XQueryPointer (display, RootWindow (display, DefaultScreen (display)),
if (XQueryPointer (d, RootWindow (d, DefaultScreen (d)),
&root, &child, &x, &y, &winx, &winy, &mask) != False)
{
if ((mask & Button1Mask) != 0) mouseMods |= ModifierKeys::leftButtonModifier;
@@ -1094,7 +1094,7 @@ public:
};
}
~LinuxComponentPeer()
~LinuxComponentPeer() override
{
// it's dangerous to delete a window on a thread other than the message thread..
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
@@ -1299,11 +1299,14 @@ public:
ScopedXLock xlock (display);
GetXProperty prop (display, windowH, atoms->state, 0, 64, false, atoms->state);
unsigned long state;
memcpy (&state, prop.data, sizeof (unsigned long));
return prop.success
&& prop.actualType == atoms->state
&& prop.actualFormat == 32
&& prop.numItems > 0
&& ((unsigned long*) prop.data)[0] == IconicState;
&& state == IconicState;
}
void setFullScreen (bool shouldBeFullScreen) override
@@ -2754,7 +2757,10 @@ private:
long getUserTime() const
{
GetXProperty prop (display, windowH, atoms->userTime, 0, 65536, false, XA_CARDINAL);
return prop.success ? *(long*) prop.data : 0;
long result;
memcpy (&result, prop.data, sizeof (long));
return prop.success ? result : 0;
}
void updateBorderSize()
@@ -2774,7 +2780,14 @@ private:
if (prop.success && prop.actualFormat == 32)
{
auto* sizes = (const unsigned long*) prop.data;
auto data = prop.data;
std::array<unsigned long, 4> sizes;
for (auto& size : sizes)
{
memcpy (&size, data, sizeof (unsigned long));
data += sizeof (unsigned long);
}
windowBorder = BorderSize<int> ((int) sizes[2], (int) sizes[0],
(int) sizes[3], (int) sizes[1]);
@@ -3141,11 +3154,18 @@ private:
&& prop.actualFormat == 32
&& prop.numItems != 0)
{
auto* types = (const unsigned long*) prop.data;
auto* types = prop.data;
for (unsigned long i = 0; i < prop.numItems; ++i)
if (types[i] != None)
srcMimeTypeAtomList.add (types[i]);
{
unsigned long type;
memcpy (&type, types, sizeof (unsigned long));
if (type != None)
srcMimeTypeAtomList.add (type);
types += sizeof (unsigned long);
}
}
}
@@ -3566,8 +3586,16 @@ void Displays::findDisplays (float masterScale)
for (int i = 0; i < numMonitors; ++i)
{
if (auto* position = (const long*) getWorkAreaPropertyData (i))
if (auto* positionData = getWorkAreaPropertyData (i))
{
std::array<long, 4> position;
for (auto& p : position)
{
memcpy (&p, positionData, sizeof (long));
positionData += sizeof (long);
}
Display d;
d.totalArea = Rectangle<int> ((int) position[0], (int) position[1],
(int) position[2], (int) position[3]);


+ 1
- 1
modules/juce_gui_extra/embedding/juce_XEmbedComponent.h View File

@@ -87,7 +87,7 @@ public:
/** Destructor. */
~XEmbedComponent();
~XEmbedComponent() override;
/** Use this method to retrieve the host's window id when using the
host initiated version of the XEmbedProtocol


+ 13
- 0
modules/juce_gui_extra/juce_gui_extra.cpp View File

@@ -109,12 +109,25 @@
#endif
#endif
#if JUCE_CLANG
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
#endif
#include <gtk/gtk.h>
#if JUCE_GCC
#pragma GCC diagnostic pop
#endif
#if JUCE_CLANG
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic pop
#endif
#endif
#include <gtk/gtkx.h>
#include <glib-unix.h>
#include <webkit2/webkit2.h>


+ 5
- 2
modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp View File

@@ -427,7 +427,7 @@ public:
: Thread ("Webview"), owner (parent)
{}
~Pimpl()
~Pimpl() override
{
quit();
}
@@ -450,7 +450,7 @@ public:
unsigned long windowHandle;
ssize_t actual = read (inChannel, &windowHandle, sizeof (windowHandle));
if (actual != sizeof (windowHandle))
if (actual != (ssize_t) sizeof (windowHandle))
{
killChild();
return;
@@ -709,6 +709,9 @@ WebBrowserComponent::WebBrowserComponent (const bool unloadPageWhenBrowserIsHidd
: browser (new Pimpl (*this)),
unloadPageWhenBrowserIsHidden (unloadPageWhenBrowserIsHidden_)
{
ignoreUnused (blankPageShown);
ignoreUnused (unloadPageWhenBrowserIsHidden);
setOpaque (true);
browser->init();


+ 8
- 4
modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp View File

@@ -151,7 +151,7 @@ public:
owner.addComponentListener (this);
}
~Pimpl()
~Pimpl() override
{
owner.removeComponentListener (this);
setClient (0, true);
@@ -381,12 +381,16 @@ private:
if (embedInfo.success && embedInfo.actualFormat == 32
&& embedInfo.numItems >= 2 && embedInfo.data != nullptr)
{
auto* buffer = (long*) embedInfo.data;
long version;
memcpy (&version, embedInfo.data, sizeof (long));
supportsXembed = true;
xembedVersion = jmin ((int) maxXEmbedVersionToSupport, (int) buffer[0]);
xembedVersion = jmin ((int) maxXEmbedVersionToSupport, (int) version);
return ((buffer[1] & XEMBED_MAPPED) != 0);
long flags;
memcpy (&flags, embedInfo.data + sizeof (long), sizeof (long));
return ((flags & XEMBED_MAPPED) != 0);
}
else
{


+ 1
- 1
modules/juce_osc/osc/juce_OSCReceiver.cpp View File

@@ -321,7 +321,7 @@ struct OSCReceiver::Pimpl : private Thread,
{
}
~Pimpl()
~Pimpl() override
{
disconnect();
}


+ 1
- 1
modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.cpp View File

@@ -62,7 +62,7 @@ struct OnlineUnlockForm::OverlayComp : public Component,
startThread (4);
}
~OverlayComp()
~OverlayComp() override
{
stopThread (10000);
}


Loading…
Cancel
Save