1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Fix some LLVM 17 compiler warnings

This commit is contained in:
Tom Poole 2023-09-21 14:48:07 +01:00
parent 951b873c14
commit 2fb19ffd8f
176 changed files with 867 additions and 894 deletions

View file

@ -58,7 +58,7 @@ enum DemoAnalyticsEventTypes
};
//==============================================================================
class GoogleAnalyticsDestination : public ThreadedAnalyticsDestination
class GoogleAnalyticsDestination final : public ThreadedAnalyticsDestination
{
public:
GoogleAnalyticsDestination()
@ -298,7 +298,7 @@ private:
};
//==============================================================================
class AnalyticsCollectionDemo : public Component
class AnalyticsCollectionDemo final : public Component
{
public:
//==============================================================================

View file

@ -101,8 +101,8 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE
/** This list box just displays a StringArray and broadcasts a change message when the
selected row changes.
*/
class Box2DTestList : public ListBoxModel,
public ChangeBroadcaster
class Box2DTestList final : public ListBoxModel,
public ChangeBroadcaster
{
public:
Box2DTestList (const StringArray& testList)
@ -134,7 +134,7 @@ private:
};
//==============================================================================
struct Box2DRenderComponent : public Component
struct Box2DRenderComponent final : public Component
{
Box2DRenderComponent()
{
@ -159,9 +159,9 @@ struct Box2DRenderComponent : public Component
};
//==============================================================================
class Box2DDemo : public Component,
private Timer,
private ChangeListener
class Box2DDemo final : public Component,
private Timer,
private ChangeListener
{
public:
enum Demos

View file

@ -76,8 +76,8 @@ static String valueTreeToString (const ValueTree& v)
}
//==============================================================================
class ChildProcessDemo : public Component,
private MessageListener
class ChildProcessDemo final : public Component,
private MessageListener
{
public:
ChildProcessDemo()
@ -174,9 +174,9 @@ public:
//==============================================================================
// This class is used by the main process, acting as the coordinator and receiving messages
// from the worker process.
class DemoCoordinatorProcess : public ChildProcessCoordinator,
private DeletedAtShutdown,
private AsyncUpdater
class DemoCoordinatorProcess final : public ChildProcessCoordinator,
private DeletedAtShutdown,
private AsyncUpdater
{
public:
DemoCoordinatorProcess (ChildProcessDemo& d) : demo (d) {}
@ -257,8 +257,8 @@ private:
/* This class gets instantiated in the child process, and receives messages from
the coordinator process.
*/
class DemoWorkerProcess : public ChildProcessWorker,
private DeletedAtShutdown
class DemoWorkerProcess final : public ChildProcessWorker,
private DeletedAtShutdown
{
public:
DemoWorkerProcess() = default;
@ -322,7 +322,7 @@ inline bool invokeChildProcessDemo (const String& commandLine)
// based on the command line parameters, we can't just use the normal auto-generated Main.cpp.
// Instead, we don't do anything in Main.cpp and create a JUCEApplication subclass here with
// the necessary modifications.
class Application : public JUCEApplication
class Application final : public JUCEApplication
{
public:
//==============================================================================

View file

@ -49,7 +49,7 @@
#include "../Assets/DemoUtilities.h"
//==============================================================================
class RSAComponent : public Component
class RSAComponent final : public Component
{
public:
RSAComponent()
@ -141,7 +141,7 @@ private:
};
//==============================================================================
class HashesComponent : public Component
class HashesComponent final : public Component
{
public:
HashesComponent()
@ -238,7 +238,7 @@ private:
};
//==============================================================================
class CryptographyDemo : public Component
class CryptographyDemo final : public Component
{
public:
CryptographyDemo()

View file

@ -67,7 +67,7 @@
*/
//==============================================================================
class VoicePurchases : private InAppPurchases::Listener
class VoicePurchases final : private InAppPurchases::Listener
{
public:
//==============================================================================
@ -278,7 +278,7 @@ private:
};
//==============================================================================
class PhraseModel : public ListBoxModel
class PhraseModel final : public ListBoxModel
{
public:
PhraseModel() {}
@ -308,12 +308,12 @@ private:
};
//==============================================================================
class VoiceModel : public ListBoxModel
class VoiceModel final : public ListBoxModel
{
public:
//==============================================================================
class VoiceRow : public Component,
private Timer
class VoiceRow final : public Component,
private Timer
{
public:
VoiceRow (VoicePurchases& voicePurchases) : purchases (voicePurchases)
@ -491,8 +491,8 @@ private:
};
//==============================================================================
class InAppPurchasesDemo : public Component,
private AsyncUpdater
class InAppPurchasesDemo final : public Component,
private AsyncUpdater
{
public:
InAppPurchasesDemo()

View file

@ -49,9 +49,9 @@
#include "../Assets/DemoUtilities.h"
//==============================================================================
class JavaScriptDemo : public Component,
private CodeDocument::Listener,
private Timer
class JavaScriptDemo final : public Component,
private CodeDocument::Listener,
private Timer
{
public:
JavaScriptDemo()
@ -125,7 +125,7 @@ public:
//==============================================================================
// This class is used by the script, and provides methods that the JS can call.
struct DemoClass : public DynamicObject
struct DemoClass final : public DynamicObject
{
DemoClass (JavaScriptDemo& demo) : owner (demo)
{

View file

@ -49,7 +49,7 @@
#include "../Assets/DemoUtilities.h"
//==============================================================================
struct LiveConstantDemoComponent : public Component
struct LiveConstantDemoComponent final : public Component
{
LiveConstantDemoComponent() {}
@ -78,7 +78,7 @@ struct LiveConstantDemoComponent : public Component
};
//==============================================================================
class LiveConstantDemo : public Component
class LiveConstantDemo final : public Component
{
public:
LiveConstantDemo()

View file

@ -49,7 +49,7 @@
#include "../Assets/DemoUtilities.h"
//==============================================================================
class BouncingBall : private ComponentListener
class BouncingBall : private ComponentListener
{
public:
BouncingBall (Component& comp)
@ -145,8 +145,8 @@ private:
};
//==============================================================================
class DemoThread : public BouncingBall,
public Thread
class DemoThread final : public BouncingBall,
public Thread
{
public:
DemoThread (Component& containerComp)
@ -194,8 +194,8 @@ private:
//==============================================================================
class DemoThreadPoolJob : public BouncingBall,
public ThreadPoolJob
class DemoThreadPoolJob final : public BouncingBall,
public ThreadPoolJob
{
public:
DemoThreadPoolJob (Component& containerComp)
@ -232,8 +232,8 @@ private:
};
//==============================================================================
class MultithreadingDemo : public Component,
private Timer
class MultithreadingDemo final : public Component,
private Timer
{
public:
//==============================================================================

View file

@ -49,8 +49,8 @@
#include "../Assets/DemoUtilities.h"
//==============================================================================
class NetworkingDemo : public Component,
private Thread
class NetworkingDemo final : public Component,
private Thread
{
public:
NetworkingDemo()

View file

@ -48,9 +48,9 @@
//==============================================================================
class OSCLogListBox : public ListBox,
private ListBoxModel,
private AsyncUpdater
class OSCLogListBox final : public ListBox,
private ListBoxModel,
private AsyncUpdater
{
public:
OSCLogListBox()
@ -189,7 +189,7 @@ private:
};
//==============================================================================
class OSCSenderDemo : public Component
class OSCSenderDemo final : public Component
{
public:
OSCSenderDemo()
@ -238,9 +238,9 @@ private:
};
//==============================================================================
class OSCReceiverDemo : public Component,
private OSCReceiver,
private OSCReceiver::ListenerWithOSCAddress<OSCReceiver::MessageLoopCallback>
class OSCReceiverDemo final : public Component,
private OSCReceiver,
private OSCReceiver::ListenerWithOSCAddress<OSCReceiver::MessageLoopCallback>
{
public:
//==============================================================================
@ -289,8 +289,8 @@ private:
};
//==============================================================================
class OSCMonitorDemo : public Component,
private OSCReceiver::Listener<OSCReceiver::MessageLoopCallback>
class OSCMonitorDemo final : public Component,
private OSCReceiver::Listener<OSCReceiver::MessageLoopCallback>
{
public:
//==============================================================================
@ -465,7 +465,7 @@ private:
};
//==============================================================================
class OSCDemo : public Component
class OSCDemo final : public Component
{
public:
OSCDemo()

View file

@ -121,10 +121,10 @@ public class JuceActivity extends Activity
*/
//==============================================================================
class PushNotificationsDemo : public Component,
private ChangeListener,
private ComponentListener,
private PushNotifications::Listener
class PushNotificationsDemo final : public Component,
private ChangeListener,
private ComponentListener,
private PushNotifications::Listener
{
public:
//==============================================================================
@ -781,7 +781,7 @@ private:
}
#endif
struct RowComponent : public Component
struct RowComponent final : public Component
{
RowComponent (Label& l, Component& c, int u = 1)
: label (l),
@ -1123,7 +1123,7 @@ private:
OwnedArray<RowComponent> rowComponents;
};
struct AuxActionsView : public Component
struct AuxActionsView final : public Component
{
AuxActionsView()
{
@ -1177,7 +1177,7 @@ private:
TextButton removeAllPendingNotifsButton { "Remove All Pending Notifs" };
};
struct RemoteView : public Component
struct RemoteView final : public Component
{
RemoteView()
{
@ -1209,7 +1209,7 @@ private:
TextButton unsubscribeFromSportsButton { "UnsubscribeFromSports" };
};
struct DemoTabbedComponent : public TabbedComponent
struct DemoTabbedComponent final : public TabbedComponent
{
DemoTabbedComponent (PushNotificationsDemo& demoIn, TabbedButtonBar::Orientation orientation)
: TabbedComponent (orientation), demo (demoIn)

View file

@ -219,7 +219,7 @@ static String getAllSystemInfo()
return systemInfo;
}
class SystemInfoDemo : public Component
class SystemInfoDemo final : public Component
{
public:
SystemInfoDemo()

View file

@ -50,7 +50,7 @@
//==============================================================================
/** Simple message that holds a Colour. */
struct ColourMessage : public Message
struct ColourMessage final : public Message
{
ColourMessage (Colour col) : colour (col) {}
@ -73,10 +73,10 @@ struct ColourMessage : public Message
The flash will then fade using a Timer to repaint itself and will send a change
message once it is finished.
*/
class FlashingComponent : public Component,
public MessageListener,
public ChangeBroadcaster,
private Timer
class FlashingComponent final : public Component,
public MessageListener,
public ChangeBroadcaster,
private Timer
{
public:
FlashingComponent() {}
@ -144,8 +144,8 @@ private:
};
//==============================================================================
class TimersAndEventsDemo : public Component,
private ChangeListener
class TimersAndEventsDemo final : public Component,
private ChangeListener
{
public:
TimersAndEventsDemo()

View file

@ -53,7 +53,7 @@
#include "../Assets/DemoUtilities.h"
//==============================================================================
class UnitTestsDemo : public Component
class UnitTestsDemo final : public Component
{
public:
UnitTestsDemo()
@ -146,8 +146,8 @@ public:
private:
//==============================================================================
class TestRunnerThread : public Thread,
private Timer
class TestRunnerThread final : public Thread,
private Timer
{
public:
TestRunnerThread (UnitTestsDemo& utd, const String& ctg)
@ -190,7 +190,7 @@ private:
//==============================================================================
// This subclass of UnitTestRunner is used to redirect the test output to our
// TextBox, and to interrupt the running tests when our thread is asked to stop..
class CustomTestRunner : public UnitTestRunner
class CustomTestRunner final : public UnitTestRunner
{
public:
CustomTestRunner (TestRunnerThread& trt) : owner (trt) {}

View file

@ -49,8 +49,8 @@
#include "../Assets/DemoUtilities.h"
//==============================================================================
class ValueTreeItem : public TreeViewItem,
private ValueTree::Listener
class ValueTreeItem final : public TreeViewItem,
private ValueTree::Listener
{
public:
ValueTreeItem (const ValueTree& v, UndoManager& um)
@ -179,9 +179,9 @@ private:
};
//==============================================================================
class ValueTreesDemo : public Component,
public DragAndDropContainer,
private Timer
class ValueTreesDemo final : public Component,
public DragAndDropContainer,
private Timer
{
public:
ValueTreesDemo()

View file

@ -49,7 +49,7 @@
#include "../Assets/DemoUtilities.h"
//==============================================================================
class XmlTreeItem : public TreeViewItem
class XmlTreeItem final : public TreeViewItem
{
public:
XmlTreeItem (XmlElement& x) : xml (x) {}
@ -115,7 +115,7 @@ private:
};
//==============================================================================
class JsonTreeItem : public TreeViewItem
class JsonTreeItem final : public TreeViewItem
{
public:
JsonTreeItem (Identifier i, var value)
@ -228,8 +228,8 @@ private:
};
//==============================================================================
class XMLandJSONDemo : public Component,
private CodeDocument::Listener
class XMLandJSONDemo final : public Component,
private CodeDocument::Listener
{
public:
/** The type of database to parse. */