mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
VSTPluginFormat: internal refactoring, and some new accessor methods.
This commit is contained in:
parent
a1614a8879
commit
02f5a1f876
4 changed files with 1212 additions and 1272 deletions
|
|
@ -201,18 +201,9 @@ private:
|
|||
void addTimer (Timer* const t) noexcept
|
||||
{
|
||||
#if JUCE_DEBUG
|
||||
Timer* tt = firstTimer;
|
||||
|
||||
while (tt != nullptr)
|
||||
{
|
||||
// trying to add a timer that's already here - shouldn't get to this point,
|
||||
// so if you get this assertion, let me know!
|
||||
jassert (tt != t);
|
||||
|
||||
tt = tt->next;
|
||||
}
|
||||
|
||||
jassert (t->previous == nullptr && t->next == nullptr);
|
||||
// trying to add a timer that's already here - shouldn't get to this point,
|
||||
// so if you get this assertion, let me know!
|
||||
jassert (! timerExists (t));
|
||||
#endif
|
||||
|
||||
Timer* i = firstTimer;
|
||||
|
|
@ -246,23 +237,9 @@ private:
|
|||
void removeTimer (Timer* const t) noexcept
|
||||
{
|
||||
#if JUCE_DEBUG
|
||||
Timer* tt = firstTimer;
|
||||
bool found = false;
|
||||
|
||||
while (tt != nullptr)
|
||||
{
|
||||
if (tt == t)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
tt = tt->next;
|
||||
}
|
||||
|
||||
// trying to remove a timer that's not here - shouldn't get to this point,
|
||||
// so if you get this assertion, let me know!
|
||||
jassert (found);
|
||||
jassert (timerExists (t));
|
||||
#endif
|
||||
|
||||
if (t->previous != nullptr)
|
||||
|
|
@ -298,6 +275,17 @@ private:
|
|||
startThread (7);
|
||||
}
|
||||
|
||||
#if JUCE_DEBUG
|
||||
bool timerExists (Timer* const t) const noexcept
|
||||
{
|
||||
for (Timer* tt = firstTimer; tt != nullptr; tt = tt->next)
|
||||
if (tt == t)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TimerThread);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue