upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)
This commit is contained in:
@ -35,7 +35,7 @@ public:
|
||||
|
||||
void messageCallback() override
|
||||
{
|
||||
if (const ActionBroadcaster* const b = broadcaster)
|
||||
if (auto b = broadcaster.get())
|
||||
if (b->actionListeners.contains (listener))
|
||||
listener->actionListenerCallback (message);
|
||||
}
|
||||
@ -52,13 +52,13 @@ private:
|
||||
ActionBroadcaster::ActionBroadcaster()
|
||||
{
|
||||
// are you trying to create this object before or after juce has been intialised??
|
||||
jassert (MessageManager::getInstanceWithoutCreating() != nullptr);
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_EXISTS
|
||||
}
|
||||
|
||||
ActionBroadcaster::~ActionBroadcaster()
|
||||
{
|
||||
// all event-based objects must be deleted BEFORE juce is shut down!
|
||||
jassert (MessageManager::getInstanceWithoutCreating() != nullptr);
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_EXISTS
|
||||
}
|
||||
|
||||
void ActionBroadcaster::addActionListener (ActionListener* const listener)
|
||||
|
@ -35,7 +35,7 @@ class JUCE_API ActionListener
|
||||
{
|
||||
public:
|
||||
/** Destructor. */
|
||||
virtual ~ActionListener() {}
|
||||
virtual ~ActionListener() = default;
|
||||
|
||||
/** Overridden by your subclass to receive the callback.
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
//==============================================================================
|
||||
AsyncUpdater::AsyncUpdater()
|
||||
{
|
||||
activeMessage = new AsyncUpdaterMessage (*this);
|
||||
activeMessage = *new AsyncUpdaterMessage (*this);
|
||||
}
|
||||
|
||||
AsyncUpdater::~AsyncUpdater()
|
||||
@ -63,7 +63,7 @@ void AsyncUpdater::triggerAsyncUpdate()
|
||||
{
|
||||
// If you're calling this before (or after) the MessageManager is
|
||||
// running, then you're not going to get any callbacks!
|
||||
jassert (MessageManager::getInstanceWithoutCreating() != nullptr);
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_EXISTS
|
||||
|
||||
if (activeMessage->shouldDeliver.compareAndSetBool (1, 0))
|
||||
if (! activeMessage->post())
|
||||
@ -79,7 +79,7 @@ void AsyncUpdater::cancelPendingUpdate() noexcept
|
||||
void AsyncUpdater::handleUpdateNowIfNeeded()
|
||||
{
|
||||
// This can only be called by the event thread.
|
||||
jassert (MessageManager::getInstance()->currentThreadHasLockedMessageManager());
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
if (activeMessage->shouldDeliver.exchange (0) != 0)
|
||||
handleAsyncUpdate();
|
||||
|
@ -36,7 +36,7 @@ void ChangeBroadcaster::addChangeListener (ChangeListener* const listener)
|
||||
{
|
||||
// Listeners can only be safely added when the event thread is locked
|
||||
// You can use a MessageManagerLock if you need to call this from another thread.
|
||||
jassert (MessageManager::getInstance()->currentThreadHasLockedMessageManager());
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
changeListeners.add (listener);
|
||||
}
|
||||
@ -45,7 +45,7 @@ void ChangeBroadcaster::removeChangeListener (ChangeListener* const listener)
|
||||
{
|
||||
// Listeners can only be safely removed when the event thread is locked
|
||||
// You can use a MessageManagerLock if you need to call this from another thread.
|
||||
jassert (MessageManager::getInstance()->currentThreadHasLockedMessageManager());
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
changeListeners.remove (listener);
|
||||
}
|
||||
@ -54,7 +54,7 @@ void ChangeBroadcaster::removeAllChangeListeners()
|
||||
{
|
||||
// Listeners can only be safely removed when the event thread is locked
|
||||
// You can use a MessageManagerLock if you need to call this from another thread.
|
||||
jassert (MessageManager::getInstance()->currentThreadHasLockedMessageManager());
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
changeListeners.clear();
|
||||
}
|
||||
@ -68,7 +68,7 @@ void ChangeBroadcaster::sendChangeMessage()
|
||||
void ChangeBroadcaster::sendSynchronousChangeMessage()
|
||||
{
|
||||
// This can only be called by the event thread.
|
||||
jassert (MessageManager::getInstance()->isThisTheMessageThread());
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
broadcastCallback.cancelPendingUpdate();
|
||||
callListeners();
|
||||
|
@ -45,7 +45,7 @@ class JUCE_API ChangeListener
|
||||
{
|
||||
public:
|
||||
/** Destructor. */
|
||||
virtual ~ChangeListener() {}
|
||||
virtual ~ChangeListener() = default;
|
||||
|
||||
/** Your subclass should implement this method to receive the callback.
|
||||
@param source the ChangeBroadcaster that triggered the callback.
|
||||
|
Reference in New Issue
Block a user