Browse Source

A few tweaks to support the MSVC DLL build.

tags/2021-05-28
jules 12 years ago
parent
commit
98f17ab4dc
4 changed files with 12 additions and 15 deletions
  1. +1
    -1
      modules/juce_data_structures/values/juce_ValueTree.h
  2. +7
    -7
      modules/juce_events/timers/juce_MultiTimer.cpp
  3. +2
    -5
      modules/juce_events/timers/juce_MultiTimer.h
  4. +2
    -2
      modules/juce_gui_basics/menus/juce_PopupMenu.h

+ 1
- 1
modules/juce_data_structures/values/juce_ValueTree.h View File

@@ -492,7 +492,7 @@ public:
private:
//==============================================================================
class SharedObject;
JUCE_PUBLIC_IN_DLL_BUILD (class SharedObject)
friend class SharedObject;
ReferenceCountedObjectPtr<SharedObject> object;


+ 7
- 7
modules/juce_events/timers/juce_MultiTimer.cpp View File

@@ -22,7 +22,7 @@
==============================================================================
*/
struct MultiTimer::MultiTimerCallback : public Timer
struct MultiTimerCallback : public Timer
{
MultiTimerCallback (const int tid, MultiTimer& mt) noexcept
: owner (mt), timerID (tid)
@@ -51,11 +51,11 @@ MultiTimer::~MultiTimer()
}
//==============================================================================
MultiTimer::MultiTimerCallback* MultiTimer::getCallback (int timerID) const noexcept
Timer* MultiTimer::getCallback (int timerID) const noexcept
{
for (int i = timers.size(); --i >= 0;)
{
MultiTimerCallback* const t = timers.getUnchecked(i);
MultiTimerCallback* const t = static_cast<MultiTimerCallback*> (timers.getUnchecked(i));
if (t->timerID == timerID)
return t;
@@ -68,7 +68,7 @@ void MultiTimer::startTimer (const int timerID, const int intervalInMilliseconds
{
const SpinLock::ScopedLockType sl (timerListLock);
MultiTimerCallback* timer = getCallback (timerID);
Timer* timer = getCallback (timerID);
if (timer == nullptr)
timers.add (timer = new MultiTimerCallback (timerID, *this));
@@ -80,7 +80,7 @@ void MultiTimer::stopTimer (const int timerID) noexcept
{
const SpinLock::ScopedLockType sl (timerListLock);
if (MultiTimerCallback* const t = getCallback (timerID))
if (Timer* const t = getCallback (timerID))
t->stopTimer();
}
@@ -88,7 +88,7 @@ bool MultiTimer::isTimerRunning (const int timerID) const noexcept
{
const SpinLock::ScopedLockType sl (timerListLock);
if (MultiTimerCallback* const t = getCallback (timerID))
if (Timer* const t = getCallback (timerID))
return t->isTimerRunning();
return false;
@@ -98,7 +98,7 @@ int MultiTimer::getTimerInterval (const int timerID) const noexcept
{
const SpinLock::ScopedLockType sl (timerListLock);
if (MultiTimerCallback* const t = getCallback (timerID))
if (Timer* const t = getCallback (timerID))
return t->getTimerInterval();
return 0;


+ 2
- 5
modules/juce_events/timers/juce_MultiTimer.h View File

@@ -103,13 +103,11 @@ public:
//==============================================================================
/** Checks whether a timer has been started for a specified ID.
@returns true if a timer with the given ID is running.
*/
bool isTimerRunning (int timerID) const noexcept;
/** Returns the interval for a specified timer ID.
@returns the timer's interval in milliseconds if it's running, or 0 if no
timer was running for the ID number specified.
*/
@@ -118,11 +116,10 @@ public:
//==============================================================================
private:
struct MultiTimerCallback;
SpinLock timerListLock;
OwnedArray<MultiTimerCallback> timers;
OwnedArray<Timer> timers;
MultiTimerCallback* getCallback (int) const noexcept;
Timer* getCallback (int) const noexcept;
MultiTimer& operator= (const MultiTimer&);
};


+ 2
- 2
modules/juce_gui_basics/menus/juce_PopupMenu.h View File

@@ -482,8 +482,8 @@ public:
private:
//==============================================================================
class Item;
struct HelperClasses;
JUCE_PUBLIC_IN_DLL_BUILD (class Item)
JUCE_PUBLIC_IN_DLL_BUILD (struct HelperClasses)
friend struct HelperClasses;
friend class MenuBarComponent;


Loading…
Cancel
Save