Browse Source

Minor code clean-ups

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
32081a387c
30 changed files with 240 additions and 279 deletions
  1. +88
    -107
      juce_amalgamated.cpp
  2. +32
    -32
      juce_amalgamated.h
  3. +7
    -7
      src/audio/plugins/juce_KnownPluginList.cpp
  4. +3
    -3
      src/audio/plugins/juce_KnownPluginList.h
  5. +5
    -5
      src/containers/juce_PropertySet.cpp
  6. +5
    -5
      src/containers/juce_PropertySet.h
  7. +2
    -2
      src/core/juce_RelativeTime.cpp
  8. +1
    -1
      src/core/juce_RelativeTime.h
  9. +5
    -5
      src/core/juce_Time.cpp
  10. +5
    -5
      src/core/juce_Time.h
  11. +6
    -7
      src/events/juce_ActionListenerList.cpp
  12. +5
    -5
      src/events/juce_ActionListenerList.h
  13. +1
    -1
      src/events/juce_AsyncUpdater.cpp
  14. +2
    -2
      src/events/juce_AsyncUpdater.h
  15. +4
    -4
      src/events/juce_ChangeBroadcaster.cpp
  16. +4
    -4
      src/events/juce_ChangeBroadcaster.h
  17. +6
    -6
      src/events/juce_ChangeListenerList.cpp
  18. +6
    -6
      src/events/juce_ChangeListenerList.h
  19. +1
    -1
      src/events/juce_MessageManager.h
  20. +10
    -10
      src/gui/components/controls/juce_TextEditor.cpp
  21. +1
    -1
      src/io/network/juce_URL.cpp
  22. +5
    -8
      src/io/streams/juce_OutputStream.cpp
  23. +0
    -3
      src/native/linux/juce_linux_Audio.cpp
  24. +6
    -12
      src/native/linux/juce_linux_JackAudio.cpp
  25. +2
    -3
      src/native/linux/juce_linux_Messaging.cpp
  26. +11
    -11
      src/native/linux/juce_linux_Midi.cpp
  27. +2
    -3
      src/native/mac/juce_iphone_MessageManager.mm
  28. +4
    -2
      src/native/mac/juce_mac_MessageManager.mm
  29. +10
    -17
      src/native/windows/juce_win32_ASIO.cpp
  30. +1
    -1
      src/native/windows/juce_win32_Messaging.cpp

+ 88
- 107
juce_amalgamated.cpp View File

@@ -1498,7 +1498,7 @@ const RelativeTime RelativeTime::weeks (const double numberOfWeeks) throw()

int64 RelativeTime::inMilliseconds() const throw()
{
return (int64)(seconds * 1000.0);
return (int64) (seconds * 1000.0);
}

double RelativeTime::inMinutes() const throw()
@@ -1521,7 +1521,7 @@ double RelativeTime::inWeeks() const throw()
return seconds / (60.0 * 60.0 * 24.0 * 7.0);
}

const String RelativeTime::getDescription (const String& returnValueForZeroTime) const throw()
const String RelativeTime::getDescription (const String& returnValueForZeroTime) const
{
if (seconds < 0.001 && seconds > -0.001)
return returnValueForZeroTime;
@@ -2064,7 +2064,7 @@ const String Time::toString (const bool includeDate,
return result.trimEnd();
}

const String Time::formatted (const String& format) const throw()
const String Time::formatted (const String& format) const
{
String buffer;
int bufferSize = 128;
@@ -2187,17 +2187,17 @@ const String Time::getTimeZone() const throw()
return zone[0].substring (0, 3);
}

const String Time::getMonthName (const bool threeLetterVersion) const throw()
const String Time::getMonthName (const bool threeLetterVersion) const
{
return getMonthName (getMonth(), threeLetterVersion);
}

const String Time::getWeekdayName (const bool threeLetterVersion) const throw()
const String Time::getWeekdayName (const bool threeLetterVersion) const
{
return getWeekdayName (getDayOfWeek(), threeLetterVersion);
}

const String Time::getMonthName (int monthNumber, const bool threeLetterVersion) throw()
const String Time::getMonthName (int monthNumber, const bool threeLetterVersion)
{
const char* const shortMonthNames[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
const char* const longMonthNames[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
@@ -2208,7 +2208,7 @@ const String Time::getMonthName (int monthNumber, const bool threeLetterVersion)
: longMonthNames [monthNumber]);
}

const String Time::getWeekdayName (int day, const bool threeLetterVersion) throw()
const String Time::getWeekdayName (int day, const bool threeLetterVersion)
{
const char* const shortDayNames[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
const char* const longDayNames[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
@@ -3769,21 +3769,21 @@ END_JUCE_NAMESPACE
/*** Start of inlined file: juce_PropertySet.cpp ***/
BEGIN_JUCE_NAMESPACE

PropertySet::PropertySet (const bool ignoreCaseOfKeyNames) throw()
PropertySet::PropertySet (const bool ignoreCaseOfKeyNames)
: properties (ignoreCaseOfKeyNames),
fallbackProperties (0),
ignoreCaseOfKeys (ignoreCaseOfKeyNames)
{
}

PropertySet::PropertySet (const PropertySet& other) throw()
PropertySet::PropertySet (const PropertySet& other)
: properties (other.properties),
fallbackProperties (other.fallbackProperties),
ignoreCaseOfKeys (other.ignoreCaseOfKeys)
{
}

PropertySet& PropertySet::operator= (const PropertySet& other) throw()
PropertySet& PropertySet::operator= (const PropertySet& other)
{
properties = other.properties;
fallbackProperties = other.fallbackProperties;
@@ -3920,7 +3920,7 @@ void PropertySet::setFallbackPropertySet (PropertySet* fallbackProperties_) thro
fallbackProperties = fallbackProperties_;
}

XmlElement* PropertySet::createXml (const String& nodeName) const throw()
XmlElement* PropertySet::createXml (const String& nodeName) const
{
const ScopedLock sl (lock);
XmlElement* const xml = new XmlElement (nodeName);
@@ -3935,7 +3935,7 @@ XmlElement* PropertySet::createXml (const String& nodeName) const throw()
return xml;
}

void PropertySet::restoreFromXml (const XmlElement& xml) throw()
void PropertySet::restoreFromXml (const XmlElement& xml)
{
const ScopedLock sl (lock);
clear();
@@ -6612,8 +6612,7 @@ END_JUCE_NAMESPACE
BEGIN_JUCE_NAMESPACE

#if JUCE_DEBUG
static CriticalSection activeStreamLock;
static Array<void*> activeStreams;
static Array<void*, CriticalSection> activeStreams;

void juce_CheckForDanglingStreams()
{
@@ -6629,18 +6628,16 @@ void juce_CheckForDanglingStreams()

OutputStream::OutputStream()
{
#if JUCE_DEBUG
const ScopedLock sl (activeStreamLock);
#if JUCE_DEBUG
activeStreams.add (this);
#endif
#endif
}

OutputStream::~OutputStream()
{
#if JUCE_DEBUG
const ScopedLock sl (activeStreamLock);
#if JUCE_DEBUG
activeStreams.removeValue (this);
#endif
#endif
}

void OutputStream::writeBool (const bool b)
@@ -9038,7 +9035,7 @@ static const String getMangledParameters (const StringPairArray& parameters)
for (int i = 0; i < parameters.size(); ++i)
{
if (i > 0)
p += '&';
p << '&';

p << URL::addEscapeChars (parameters.getAllKeys() [i], true)
<< '='
@@ -30009,7 +30006,7 @@ void KnownPluginList::clear()
}
}

PluginDescription* KnownPluginList::getTypeForFile (const String& fileOrIdentifier) const throw()
PluginDescription* KnownPluginList::getTypeForFile (const String& fileOrIdentifier) const
{
for (int i = 0; i < types.size(); ++i)
if (types.getUnchecked(i)->fileOrIdentifier == fileOrIdentifier)
@@ -30018,7 +30015,7 @@ PluginDescription* KnownPluginList::getTypeForFile (const String& fileOrIdentifi
return 0;
}

PluginDescription* KnownPluginList::getTypeForIdentifierString (const String& identifierString) const throw()
PluginDescription* KnownPluginList::getTypeForIdentifierString (const String& identifierString) const
{
for (int i = 0; i < types.size(); ++i)
if (types.getUnchecked(i)->createIdentifierString() == identifierString)
@@ -30053,7 +30050,7 @@ void KnownPluginList::removeType (const int index)
sendChangeMessage (this);
}

static Time getFileModTime (const String& fileOrIdentifier) throw()
static const Time getPluginFileModTime (const String& fileOrIdentifier)
{
if (fileOrIdentifier.startsWithChar ('/') || fileOrIdentifier[1] == ':')
return File (fileOrIdentifier).getLastModificationTime();
@@ -30066,7 +30063,7 @@ static bool timesAreDifferent (const Time& t1, const Time& t2) throw()
return t1 != t2 || t1 == Time (0);
}

bool KnownPluginList::isListingUpToDate (const String& fileOrIdentifier) const throw()
bool KnownPluginList::isListingUpToDate (const String& fileOrIdentifier) const
{
if (getTypeForFile (fileOrIdentifier) == 0)
return false;
@@ -30076,7 +30073,7 @@ bool KnownPluginList::isListingUpToDate (const String& fileOrIdentifier) const t
const PluginDescription* const d = types.getUnchecked(i);

if (d->fileOrIdentifier == fileOrIdentifier
&& timesAreDifferent (d->lastFileModTime, getFileModTime (fileOrIdentifier)))
&& timesAreDifferent (d->lastFileModTime, getPluginFileModTime (fileOrIdentifier)))
{
return false;
}
@@ -30103,7 +30100,7 @@ bool KnownPluginList::scanAndAddFile (const String& fileOrIdentifier,

if (d->fileOrIdentifier == fileOrIdentifier)
{
if (timesAreDifferent (d->lastFileModTime, getFileModTime (fileOrIdentifier)))
if (timesAreDifferent (d->lastFileModTime, getPluginFileModTime (fileOrIdentifier)))
needsRescanning = true;
else
typesFound.add (new PluginDescription (*d));
@@ -30176,7 +30173,7 @@ public:
PluginSorter() throw() {}

int compareElements (const PluginDescription* const first,
const PluginDescription* const second) const throw()
const PluginDescription* const second) const
{
int diff = 0;

@@ -37932,8 +37929,7 @@ class ActionMessage : public Message
public:
const String message;

ActionMessage (const String& messageText,
void* const listener_) throw()
ActionMessage (const String& messageText, void* const listener_) throw()
: message (messageText)
{
pointerParameter = listener_;
@@ -37948,15 +37944,15 @@ private:
ActionMessage& operator= (const ActionMessage&);
};

ActionListenerList::ActionListenerList() throw()
ActionListenerList::ActionListenerList()
{
}

ActionListenerList::~ActionListenerList() throw()
ActionListenerList::~ActionListenerList()
{
}

void ActionListenerList::addActionListener (ActionListener* const listener) throw()
void ActionListenerList::addActionListener (ActionListener* const listener)
{
const ScopedLock sl (actionListenerLock_);

@@ -37967,7 +37963,7 @@ void ActionListenerList::addActionListener (ActionListener* const listener) thro
actionListeners_.add (listener);
}

void ActionListenerList::removeActionListener (ActionListener* const listener) throw()
void ActionListenerList::removeActionListener (ActionListener* const listener)
{
const ScopedLock sl (actionListenerLock_);

@@ -37976,7 +37972,7 @@ void ActionListenerList::removeActionListener (ActionListener* const listener)
actionListeners_.removeValue (listener);
}

void ActionListenerList::removeAllActionListeners() throw()
void ActionListenerList::removeAllActionListeners()
{
const ScopedLock sl (actionListenerLock_);
actionListeners_.clear();
@@ -38015,7 +38011,7 @@ AsyncUpdater::~AsyncUpdater()
{
}

void AsyncUpdater::triggerAsyncUpdate() throw()
void AsyncUpdater::triggerAsyncUpdate()
{
if (! asyncMessagePending)
{
@@ -38062,12 +38058,12 @@ ChangeBroadcaster::~ChangeBroadcaster()
jassert (MessageManager::instance != 0);
}

void ChangeBroadcaster::addChangeListener (ChangeListener* const listener) throw()
void ChangeBroadcaster::addChangeListener (ChangeListener* const listener)
{
changeListenerList.addChangeListener (listener);
}

void ChangeBroadcaster::removeChangeListener (ChangeListener* const listener) throw()
void ChangeBroadcaster::removeChangeListener (ChangeListener* const listener)
{
jassert (changeListenerList.isValidMessageListener());

@@ -38075,12 +38071,12 @@ void ChangeBroadcaster::removeChangeListener (ChangeListener* const listener) th
changeListenerList.removeChangeListener (listener);
}

void ChangeBroadcaster::removeAllChangeListeners() throw()
void ChangeBroadcaster::removeAllChangeListeners()
{
changeListenerList.removeAllChangeListeners();
}

void ChangeBroadcaster::sendChangeMessage (void* objectThatHasChanged) throw()
void ChangeBroadcaster::sendChangeMessage (void* objectThatHasChanged)
{
changeListenerList.sendChangeMessage (objectThatHasChanged);
}
@@ -38102,17 +38098,17 @@ END_JUCE_NAMESPACE
/*** Start of inlined file: juce_ChangeListenerList.cpp ***/
BEGIN_JUCE_NAMESPACE

ChangeListenerList::ChangeListenerList() throw()
ChangeListenerList::ChangeListenerList()
: lastChangedObject (0),
messagePending (false)
{
}

ChangeListenerList::~ChangeListenerList() throw()
ChangeListenerList::~ChangeListenerList()
{
}

void ChangeListenerList::addChangeListener (ChangeListener* const listener) throw()
void ChangeListenerList::addChangeListener (ChangeListener* const listener)
{
const ScopedLock sl (lock);

@@ -38122,19 +38118,19 @@ void ChangeListenerList::addChangeListener (ChangeListener* const listener) thro
listeners.add (listener);
}

void ChangeListenerList::removeChangeListener (ChangeListener* const listener) throw()
void ChangeListenerList::removeChangeListener (ChangeListener* const listener)
{
const ScopedLock sl (lock);
listeners.removeValue (listener);
}

void ChangeListenerList::removeAllChangeListeners() throw()
void ChangeListenerList::removeAllChangeListeners()
{
const ScopedLock sl (lock);
listeners.clear();
}

void ChangeListenerList::sendChangeMessage (void* const objectThatHasChanged) throw()
void ChangeListenerList::sendChangeMessage (void* const objectThatHasChanged)
{
const ScopedLock sl (lock);

@@ -53111,6 +53107,12 @@ namespace TextEditorDefs
const int focusLossMessageId = 0x10003004;

const int maxActionsPerTransaction = 100;

static int getCharacterCategory (const juce_wchar character)
{
return CharacterFunctions::isLetterOrDigit (character)
? 2 : (CharacterFunctions::isWhitespace (character) ? 0 : 1);
}
}

TextEditor::TextEditor (const String& name,
@@ -54684,12 +54686,6 @@ int TextEditor::indexAtPosition (const float x, const float y)
return getTotalNumChars();
}

static int getCharacterCategory (const juce_wchar character)
{
return CharacterFunctions::isLetterOrDigit (character)
? 2 : (CharacterFunctions::isWhitespace (character) ? 0 : 1);
}

int TextEditor::findWordBreakAfter (const int position) const
{
const String t (getTextInRange (Range<int> (position, position + 512)));
@@ -54699,9 +54695,9 @@ int TextEditor::findWordBreakAfter (const int position) const
while (i < totalLength && CharacterFunctions::isWhitespace (t[i]))
++i;

const int type = getCharacterCategory (t[i]);
const int type = TextEditorDefs::getCharacterCategory (t[i]);

while (i < totalLength && type == getCharacterCategory (t[i]))
while (i < totalLength && type == TextEditorDefs::getCharacterCategory (t[i]))
++i;

while (i < totalLength && CharacterFunctions::isWhitespace (t[i]))
@@ -54725,9 +54721,9 @@ int TextEditor::findWordBreakBefore (const int position) const

if (i > 0)
{
const int type = getCharacterCategory (t [i - 1]);
const int type = TextEditorDefs::getCharacterCategory (t [i - 1]);

while (i > 0 && type == getCharacterCategory (t [i - 1]))
while (i > 0 && type == TextEditorDefs::getCharacterCategory (t [i - 1]))
--i;
}

@@ -239787,7 +239783,7 @@ static BOOL CALLBACK BroadcastEnumWindowProc (HWND hwnd, LPARAM lParam)
return TRUE;
}

void MessageManager::broadcastMessage (const String& value) throw()
void MessageManager::broadcastMessage (const String& value)
{
Array<void*> windows;
EnumWindows (&BroadcastEnumWindowProc, (LPARAM) &windows);
@@ -248953,33 +248949,26 @@ void MidiOutput::sendMessageNow (const MidiMessage& message)

#undef WINDOWS

// #define ASIO_DEBUGGING
// #define ASIO_DEBUGGING 1

#ifdef ASIO_DEBUGGING
#if ASIO_DEBUGGING
#define log(a) { Logger::writeToLog (a); DBG (a) }
#else
#define log(a) {}
#endif

#ifdef ASIO_DEBUGGING
#if ASIO_DEBUGGING
static void logError (const String& context, long error)
{
String err ("unknown error");

if (error == ASE_NotPresent)
err = "Not Present";
else if (error == ASE_HWMalfunction)
err = "Hardware Malfunction";
else if (error == ASE_InvalidParameter)
err = "Invalid Parameter";
else if (error == ASE_InvalidMode)
err = "Invalid Mode";
else if (error == ASE_SPNotAdvancing)
err = "Sample position not advancing";
else if (error == ASE_NoClock)
err = "No Clock";
else if (error == ASE_NoMemory)
err = "Out of memory";
if (error == ASE_NotPresent) err = "Not Present";
else if (error == ASE_HWMalfunction) err = "Hardware Malfunction";
else if (error == ASE_InvalidParameter) err = "Invalid Parameter";
else if (error == ASE_InvalidMode) err = "Invalid Mode";
else if (error == ASE_SPNotAdvancing) err = "Sample position not advancing";
else if (error == ASE_NoClock) err = "No Clock";
else if (error == ASE_NoMemory) err = "Out of memory";

log ("!!error: " + context + " - " + err);
}
@@ -256879,13 +256868,12 @@ bool juce_postMessageToSystemQueue (Message* message)
return true;
}

void MessageManager::broadcastMessage (const String& value) throw()
void MessageManager::broadcastMessage (const String& value)
{
/* TODO */
}

void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* func,
void* parameter)
void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* func, void* parameter)
{
if (LinuxErrorHandling::errorOccurred)
return 0;
@@ -260902,8 +260890,6 @@ const int KeyPress::rewindKey = (0xffeeff03) | Keys::extendedKeyModifier;
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_ALSA

static const int maxNumChans = 64;

static void getDeviceSampleRates (snd_pcm_t* handle, Array <int>& rates)
{
const int ratesToTry[] = { 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000, 0 };
@@ -261866,18 +261852,12 @@ static void jack_Log (const String& s)

static void dumpJackErrorMessage (const jack_status_t status)
{
if (status & JackServerFailed || status & JackServerError)
jack_Log ("Unable to connect to JACK server");
if (status & JackVersionError)
jack_Log ("Client's protocol version does not match");
if (status & JackInvalidOption)
jack_Log ("The operation contained an invalid or unsupported option");
if (status & JackNameNotUnique)
jack_Log ("The desired client name was not unique");
if (status & JackNoSuchClient)
jack_Log ("Requested client does not exist");
if (status & JackInitFailure)
jack_Log ("Unable to initialize client");
if (status & JackServerFailed || status & JackServerError) jack_Log ("Unable to connect to JACK server");
if (status & JackVersionError) jack_Log ("Client's protocol version does not match");
if (status & JackInvalidOption) jack_Log ("The operation contained an invalid or unsupported option");
if (status & JackNameNotUnique) jack_Log ("The desired client name was not unique");
if (status & JackNoSuchClient) jack_Log ("Requested client does not exist");
if (status & JackInitFailure) jack_Log ("Unable to initialize client");
}
#else
#define dumpJackErrorMessage(a) {}
@@ -262385,9 +262365,9 @@ AudioIODeviceType* juce_createAudioIODeviceType_JACK() { return 0; }
#if JUCE_INCLUDED_FILE
#if JUCE_ALSA

static snd_seq_t* iterateDevices (const bool forInput,
StringArray& deviceNamesFound,
const int deviceIndexToOpen)
static snd_seq_t* iterateMidiDevices (const bool forInput,
StringArray& deviceNamesFound,
const int deviceIndexToOpen)
{
snd_seq_t* returnedHandle = 0;
snd_seq_t* seqHandle;
@@ -262474,8 +262454,8 @@ static snd_seq_t* iterateDevices (const bool forInput,
return returnedHandle;
}

static snd_seq_t* createDevice (const bool forInput,
const String& deviceNameToOpen)
static snd_seq_t* createMidiDevice (const bool forInput,
const String& deviceNameToOpen)
{
snd_seq_t* seqHandle = 0;

@@ -262563,7 +262543,7 @@ private:
const StringArray MidiOutput::getDevices()
{
StringArray devices;
iterateDevices (false, devices, -1);
iterateMidiDevices (false, devices, -1);
return devices;
}

@@ -262577,7 +262557,7 @@ MidiOutput* MidiOutput::openDevice (int deviceIndex)
MidiOutput* newDevice = 0;

StringArray devices;
snd_seq_t* const handle = iterateDevices (false, devices, deviceIndex);
snd_seq_t* const handle = iterateMidiDevices (false, devices, deviceIndex);

if (handle != 0)
{
@@ -262592,7 +262572,7 @@ MidiOutput* MidiOutput::createNewDevice (const String& deviceName)
{
MidiOutput* newDevice = 0;

snd_seq_t* const handle = createDevice (false, deviceName);
snd_seq_t* const handle = createMidiDevice (false, deviceName);

if (handle != 0)
{
@@ -262736,7 +262716,7 @@ int MidiInput::getDefaultDeviceIndex()
const StringArray MidiInput::getDevices()
{
StringArray devices;
iterateDevices (true, devices, -1);
iterateMidiDevices (true, devices, -1);
return devices;
}

@@ -262745,7 +262725,7 @@ MidiInput* MidiInput::openDevice (int deviceIndex, MidiInputCallback* callback)
MidiInput* newDevice = 0;

StringArray devices;
snd_seq_t* const handle = iterateDevices (true, devices, deviceIndex);
snd_seq_t* const handle = iterateMidiDevices (true, devices, deviceIndex);

if (handle != 0)
{
@@ -262760,7 +262740,7 @@ MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallba
{
MidiInput* newDevice = 0;

snd_seq_t* const handle = createDevice (true, deviceName);
snd_seq_t* const handle = createMidiDevice (true, deviceName);

if (handle != 0)
{
@@ -268019,12 +267999,11 @@ bool juce_postMessageToSystemQueue (Message* message)
return true;
}

void MessageManager::broadcastMessage (const String& value) throw()
void MessageManager::broadcastMessage (const String& value)
{
}

void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* callback,
void* data)
void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* callback, void* data)
{
if (isThisTheMessageThread())
{
@@ -276533,7 +276512,9 @@ static bool isEventBlockedByModalComps (NSEvent* e)
}
else
{
if (JUCEApplication::isStandaloneApp()
NSViewComponentPeer* nsViewPeer = dynamic_cast<NSViewComponentPeer*> (peer);

if ((nsViewPeer == 0 || ! nsViewPeer->isSharedWindow)
? NSPointInRect ([e locationInWindow], NSMakeRect (0, 0, [w frame].size.width, [w frame].size.height))
: NSPointInRect ([compView convertPoint: [e locationInWindow] fromView: nil], [compView bounds]))
return false;
@@ -276611,7 +276592,7 @@ bool juce_postMessageToSystemQueue (Message* message)
return true;
}

void MessageManager::broadcastMessage (const String& value) throw()
void MessageManager::broadcastMessage (const String& value)
{
}



+ 32
- 32
juce_amalgamated.h View File

@@ -8093,7 +8093,7 @@ public:

@see inMilliseconds, inSeconds, inMinutes, inHours, inDays, inWeeks
*/
const String getDescription (const String& returnValueForZeroTime = "0") const throw();
const String getDescription (const String& returnValueForZeroTime = "0") const;

/** Compares two RelativeTimes. */
bool operator== (const RelativeTime& other) const throw();
@@ -8237,7 +8237,7 @@ public:
it'll return the long form, e.g. "January"
@see getMonth
*/
const String getMonthName (bool threeLetterVersion) const throw();
const String getMonthName (bool threeLetterVersion) const;

/** Returns the day of the month.

@@ -8256,7 +8256,7 @@ public:
@param threeLetterVersion if true, it'll return a 3-letter abbreviation, e.g. "Tue"; if
false, it'll return the full version, e.g. "Tuesday".
*/
const String getWeekdayName (bool threeLetterVersion) const throw();
const String getWeekdayName (bool threeLetterVersion) const;

/** Returns the number of hours since midnight.

@@ -8352,7 +8352,7 @@ public:

@see toString
*/
const String formatted (const String& format) const throw();
const String formatted (const String& format) const;

/** Adds a RelativeTime to this time and returns the result. */
const Time operator+ (const RelativeTime& delta) const throw() { return Time (millisSinceEpoch + delta.inMilliseconds()); }
@@ -8395,7 +8395,7 @@ public:
false, it'll return the full version, e.g. "Tuesday".
*/
static const String getWeekdayName (int dayNumber,
bool threeLetterVersion) throw();
bool threeLetterVersion);

/** Returns the name of one of the months.

@@ -8404,7 +8404,7 @@ public:
it'll return the long form, e.g. "January"
*/
static const String getMonthName (int monthNumber,
bool threeLetterVersion) throw();
bool threeLetterVersion);

// Static methods for getting system timers directly..

@@ -10068,15 +10068,15 @@ public:
@param ignoreCaseOfKeyNames if true, the names of properties are compared in a
case-insensitive way
*/
PropertySet (bool ignoreCaseOfKeyNames = false) throw();
PropertySet (bool ignoreCaseOfKeyNames = false);

/** Creates a copy of another PropertySet.
*/
PropertySet (const PropertySet& other) throw();
PropertySet (const PropertySet& other);

/** Copies another PropertySet over this one.
*/
PropertySet& operator= (const PropertySet& other) throw();
PropertySet& operator= (const PropertySet& other);

/** Destructor. */
virtual ~PropertySet();
@@ -10185,7 +10185,7 @@ public:

@see restoreFromXml
*/
XmlElement* createXml (const String& nodeName) const throw();
XmlElement* createXml (const String& nodeName) const;

/** Reloads a set of properties that were previously stored as XML.

@@ -10193,7 +10193,7 @@ public:

@see createXml
*/
void restoreFromXml (const XmlElement& xml) throw();
void restoreFromXml (const XmlElement& xml);

/** Sets up a second PopertySet that will be used to look up any values that aren't
set in this one.
@@ -12108,7 +12108,7 @@ public:
It's thread-safe to call this method from any number of threads without
needing to worry about locking.
*/
void triggerAsyncUpdate() throw();
void triggerAsyncUpdate();

/** This will stop any pending updates from happening.

@@ -12138,7 +12138,7 @@ private:
class AsyncUpdaterInternal : public MessageListener
{
public:
AsyncUpdaterInternal() throw() {}
AsyncUpdaterInternal() {}
~AsyncUpdaterInternal() {}

void handleMessage (const Message&);
@@ -12847,25 +12847,25 @@ class JUCE_API ChangeListenerList : public MessageListener
public:

/** Creates an empty list. */
ChangeListenerList() throw();
ChangeListenerList();

/** Destructor. */
~ChangeListenerList() throw();
~ChangeListenerList();

/** Adds a listener to the list.

(Trying to add a listener that's already on the list will have no effect).
*/
void addChangeListener (ChangeListener* listener) throw();
void addChangeListener (ChangeListener* listener);

/** Removes a listener from the list.

If the listener isn't on the list, this won't have any effect.
*/
void removeChangeListener (ChangeListener* listener) throw();
void removeChangeListener (ChangeListener* listener);

/** Removes all listeners from the list. */
void removeAllChangeListeners() throw();
void removeAllChangeListeners();

/** Posts an asynchronous change message to all the listeners.

@@ -12884,7 +12884,7 @@ public:
and can be any value the application needs
@see sendSynchronousChangeMessage
*/
void sendChangeMessage (void* objectThatHasChanged) throw();
void sendChangeMessage (void* objectThatHasChanged);

/** This will synchronously callback all the ChangeListeners.

@@ -12937,16 +12937,16 @@ public:

(Trying to add a listener that's already on the list will have no effect).
*/
void addChangeListener (ChangeListener* listener) throw();
void addChangeListener (ChangeListener* listener);

/** Removes a listener from the list.

If the listener isn't on the list, this won't have any effect.
*/
void removeChangeListener (ChangeListener* listener) throw();
void removeChangeListener (ChangeListener* listener);

/** Removes all listeners from the list. */
void removeAllChangeListeners() throw();
void removeAllChangeListeners();

/** Broadcasts a change message to all the registered listeners.

@@ -12956,7 +12956,7 @@ public:

@see ChangeListenerList::sendActionMessage
*/
void sendChangeMessage (void* objectThatHasChanged) throw();
void sendChangeMessage (void* objectThatHasChanged);

/** Sends a synchronous change message to all the registered listeners.

@@ -39860,14 +39860,14 @@ public:

/** Looks for a type in the list which comes from this file.
*/
PluginDescription* getTypeForFile (const String& fileOrIdentifier) const throw();
PluginDescription* getTypeForFile (const String& fileOrIdentifier) const;

/** Looks for a type in the list which matches a plugin type ID.

The identifierString parameter must have been created by
PluginDescription::createIdentifierString().
*/
PluginDescription* getTypeForIdentifierString (const String& identifierString) const throw();
PluginDescription* getTypeForIdentifierString (const String& identifierString) const;

/** Adds a type manually from its description. */
bool addType (const PluginDescription& type);
@@ -39895,7 +39895,7 @@ public:
/** Returns true if the specified file is already known about and if it
hasn't been modified since our entry was created.
*/
bool isListingUpToDate (const String& possiblePluginFileOrIdentifier) const throw();
bool isListingUpToDate (const String& possiblePluginFileOrIdentifier) const;

/** Scans and adds a bunch of files that might have been dragged-and-dropped.

@@ -42093,25 +42093,25 @@ class JUCE_API ActionListenerList : public MessageListener
public:

/** Creates an empty list. */
ActionListenerList() throw();
ActionListenerList();

/** Destructor. */
~ActionListenerList() throw();
~ActionListenerList();

/** Adds a listener to the list.

(Trying to add a listener that's already on the list will have no effect).
*/
void addActionListener (ActionListener* listener) throw();
void addActionListener (ActionListener* listener);

/** Removes a listener from the list.

If the listener isn't on the list, this won't have any effect.
*/
void removeActionListener (ActionListener* listener) throw();
void removeActionListener (ActionListener* listener);

/** Removes all listeners from the list. */
void removeAllActionListeners() throw();
void removeAllActionListeners();

/** Broadcasts a message to all the registered listeners.

@@ -42642,7 +42642,7 @@ public:
method of the broadcast listeners in the other app.
@see registerBroadcastListener, ActionListener
*/
static void broadcastMessage (const String& messageText) throw();
static void broadcastMessage (const String& messageText);

/** Registers a listener to get told about broadcast messages.



+ 7
- 7
src/audio/plugins/juce_KnownPluginList.cpp View File

@@ -49,7 +49,7 @@ void KnownPluginList::clear()
}
}
PluginDescription* KnownPluginList::getTypeForFile (const String& fileOrIdentifier) const throw()
PluginDescription* KnownPluginList::getTypeForFile (const String& fileOrIdentifier) const
{
for (int i = 0; i < types.size(); ++i)
if (types.getUnchecked(i)->fileOrIdentifier == fileOrIdentifier)
@@ -58,7 +58,7 @@ PluginDescription* KnownPluginList::getTypeForFile (const String& fileOrIdentifi
return 0;
}
PluginDescription* KnownPluginList::getTypeForIdentifierString (const String& identifierString) const throw()
PluginDescription* KnownPluginList::getTypeForIdentifierString (const String& identifierString) const
{
for (int i = 0; i < types.size(); ++i)
if (types.getUnchecked(i)->createIdentifierString() == identifierString)
@@ -93,7 +93,7 @@ void KnownPluginList::removeType (const int index)
sendChangeMessage (this);
}
static Time getFileModTime (const String& fileOrIdentifier) throw()
static const Time getPluginFileModTime (const String& fileOrIdentifier)
{
if (fileOrIdentifier.startsWithChar ('/') || fileOrIdentifier[1] == ':')
return File (fileOrIdentifier).getLastModificationTime();
@@ -106,7 +106,7 @@ static bool timesAreDifferent (const Time& t1, const Time& t2) throw()
return t1 != t2 || t1 == Time (0);
}
bool KnownPluginList::isListingUpToDate (const String& fileOrIdentifier) const throw()
bool KnownPluginList::isListingUpToDate (const String& fileOrIdentifier) const
{
if (getTypeForFile (fileOrIdentifier) == 0)
return false;
@@ -116,7 +116,7 @@ bool KnownPluginList::isListingUpToDate (const String& fileOrIdentifier) const t
const PluginDescription* const d = types.getUnchecked(i);
if (d->fileOrIdentifier == fileOrIdentifier
&& timesAreDifferent (d->lastFileModTime, getFileModTime (fileOrIdentifier)))
&& timesAreDifferent (d->lastFileModTime, getPluginFileModTime (fileOrIdentifier)))
{
return false;
}
@@ -143,7 +143,7 @@ bool KnownPluginList::scanAndAddFile (const String& fileOrIdentifier,
if (d->fileOrIdentifier == fileOrIdentifier)
{
if (timesAreDifferent (d->lastFileModTime, getFileModTime (fileOrIdentifier)))
if (timesAreDifferent (d->lastFileModTime, getPluginFileModTime (fileOrIdentifier)))
needsRescanning = true;
else
typesFound.add (new PluginDescription (*d));
@@ -217,7 +217,7 @@ public:
PluginSorter() throw() {}
int compareElements (const PluginDescription* const first,
const PluginDescription* const second) const throw()
const PluginDescription* const second) const
{
int diff = 0;


+ 3
- 3
src/audio/plugins/juce_KnownPluginList.h View File

@@ -68,14 +68,14 @@ public:
/** Looks for a type in the list which comes from this file.
*/
PluginDescription* getTypeForFile (const String& fileOrIdentifier) const throw();
PluginDescription* getTypeForFile (const String& fileOrIdentifier) const;
/** Looks for a type in the list which matches a plugin type ID.
The identifierString parameter must have been created by
PluginDescription::createIdentifierString().
*/
PluginDescription* getTypeForIdentifierString (const String& identifierString) const throw();
PluginDescription* getTypeForIdentifierString (const String& identifierString) const;
/** Adds a type manually from its description. */
bool addType (const PluginDescription& type);
@@ -103,7 +103,7 @@ public:
/** Returns true if the specified file is already known about and if it
hasn't been modified since our entry was created.
*/
bool isListingUpToDate (const String& possiblePluginFileOrIdentifier) const throw();
bool isListingUpToDate (const String& possiblePluginFileOrIdentifier) const;
/** Scans and adds a bunch of files that might have been dragged-and-dropped.


+ 5
- 5
src/containers/juce_PropertySet.cpp View File

@@ -33,21 +33,21 @@ BEGIN_JUCE_NAMESPACE
//==============================================================================
PropertySet::PropertySet (const bool ignoreCaseOfKeyNames) throw()
PropertySet::PropertySet (const bool ignoreCaseOfKeyNames)
: properties (ignoreCaseOfKeyNames),
fallbackProperties (0),
ignoreCaseOfKeys (ignoreCaseOfKeyNames)
{
}
PropertySet::PropertySet (const PropertySet& other) throw()
PropertySet::PropertySet (const PropertySet& other)
: properties (other.properties),
fallbackProperties (other.fallbackProperties),
ignoreCaseOfKeys (other.ignoreCaseOfKeys)
{
}
PropertySet& PropertySet::operator= (const PropertySet& other) throw()
PropertySet& PropertySet::operator= (const PropertySet& other)
{
properties = other.properties;
fallbackProperties = other.fallbackProperties;
@@ -184,7 +184,7 @@ void PropertySet::setFallbackPropertySet (PropertySet* fallbackProperties_) thro
fallbackProperties = fallbackProperties_;
}
XmlElement* PropertySet::createXml (const String& nodeName) const throw()
XmlElement* PropertySet::createXml (const String& nodeName) const
{
const ScopedLock sl (lock);
XmlElement* const xml = new XmlElement (nodeName);
@@ -199,7 +199,7 @@ XmlElement* PropertySet::createXml (const String& nodeName) const throw()
return xml;
}
void PropertySet::restoreFromXml (const XmlElement& xml) throw()
void PropertySet::restoreFromXml (const XmlElement& xml)
{
const ScopedLock sl (lock);
clear();


+ 5
- 5
src/containers/juce_PropertySet.h View File

@@ -50,15 +50,15 @@ public:
@param ignoreCaseOfKeyNames if true, the names of properties are compared in a
case-insensitive way
*/
PropertySet (bool ignoreCaseOfKeyNames = false) throw();
PropertySet (bool ignoreCaseOfKeyNames = false);
/** Creates a copy of another PropertySet.
*/
PropertySet (const PropertySet& other) throw();
PropertySet (const PropertySet& other);
/** Copies another PropertySet over this one.
*/
PropertySet& operator= (const PropertySet& other) throw();
PropertySet& operator= (const PropertySet& other);
/** Destructor. */
virtual ~PropertySet();
@@ -172,7 +172,7 @@ public:
@see restoreFromXml
*/
XmlElement* createXml (const String& nodeName) const throw();
XmlElement* createXml (const String& nodeName) const;
/** Reloads a set of properties that were previously stored as XML.
@@ -180,7 +180,7 @@ public:
@see createXml
*/
void restoreFromXml (const XmlElement& xml) throw();
void restoreFromXml (const XmlElement& xml);
//==============================================================================
/** Sets up a second PopertySet that will be used to look up any values that aren't


+ 2
- 2
src/core/juce_RelativeTime.cpp View File

@@ -80,7 +80,7 @@ const RelativeTime RelativeTime::weeks (const double numberOfWeeks) throw()
//==============================================================================
int64 RelativeTime::inMilliseconds() const throw()
{
return (int64)(seconds * 1000.0);
return (int64) (seconds * 1000.0);
}
double RelativeTime::inMinutes() const throw()
@@ -103,7 +103,7 @@ double RelativeTime::inWeeks() const throw()
return seconds / (60.0 * 60.0 * 24.0 * 7.0);
}
const String RelativeTime::getDescription (const String& returnValueForZeroTime) const throw()
const String RelativeTime::getDescription (const String& returnValueForZeroTime) const
{
if (seconds < 0.001 && seconds > -0.001)
return returnValueForZeroTime;


+ 1
- 1
src/core/juce_RelativeTime.h View File

@@ -146,7 +146,7 @@ public:
@see inMilliseconds, inSeconds, inMinutes, inHours, inDays, inWeeks
*/
const String getDescription (const String& returnValueForZeroTime = "0") const throw();
const String getDescription (const String& returnValueForZeroTime = "0") const;
//==============================================================================


+ 5
- 5
src/core/juce_Time.cpp View File

@@ -340,7 +340,7 @@ const String Time::toString (const bool includeDate,
return result.trimEnd();
}
const String Time::formatted (const String& format) const throw()
const String Time::formatted (const String& format) const
{
String buffer;
int bufferSize = 128;
@@ -464,17 +464,17 @@ const String Time::getTimeZone() const throw()
return zone[0].substring (0, 3);
}
const String Time::getMonthName (const bool threeLetterVersion) const throw()
const String Time::getMonthName (const bool threeLetterVersion) const
{
return getMonthName (getMonth(), threeLetterVersion);
}
const String Time::getWeekdayName (const bool threeLetterVersion) const throw()
const String Time::getWeekdayName (const bool threeLetterVersion) const
{
return getWeekdayName (getDayOfWeek(), threeLetterVersion);
}
const String Time::getMonthName (int monthNumber, const bool threeLetterVersion) throw()
const String Time::getMonthName (int monthNumber, const bool threeLetterVersion)
{
const char* const shortMonthNames[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
const char* const longMonthNames[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
@@ -485,7 +485,7 @@ const String Time::getMonthName (int monthNumber, const bool threeLetterVersion)
: longMonthNames [monthNumber]);
}
const String Time::getWeekdayName (int day, const bool threeLetterVersion) throw()
const String Time::getWeekdayName (int day, const bool threeLetterVersion)
{
const char* const shortDayNames[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
const char* const longDayNames[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };


+ 5
- 5
src/core/juce_Time.h View File

@@ -129,7 +129,7 @@ public:
it'll return the long form, e.g. "January"
@see getMonth
*/
const String getMonthName (bool threeLetterVersion) const throw();
const String getMonthName (bool threeLetterVersion) const;
/** Returns the day of the month.
@@ -148,7 +148,7 @@ public:
@param threeLetterVersion if true, it'll return a 3-letter abbreviation, e.g. "Tue"; if
false, it'll return the full version, e.g. "Tuesday".
*/
const String getWeekdayName (bool threeLetterVersion) const throw();
const String getWeekdayName (bool threeLetterVersion) const;
/** Returns the number of hours since midnight.
@@ -245,7 +245,7 @@ public:
@see toString
*/
const String formatted (const String& format) const throw();
const String formatted (const String& format) const;
//==============================================================================
/** Adds a RelativeTime to this time and returns the result. */
@@ -291,7 +291,7 @@ public:
false, it'll return the full version, e.g. "Tuesday".
*/
static const String getWeekdayName (int dayNumber,
bool threeLetterVersion) throw();
bool threeLetterVersion);
/** Returns the name of one of the months.
@@ -300,7 +300,7 @@ public:
it'll return the long form, e.g. "January"
*/
static const String getMonthName (int monthNumber,
bool threeLetterVersion) throw();
bool threeLetterVersion);
//==============================================================================
// Static methods for getting system timers directly..


+ 6
- 7
src/events/juce_ActionListenerList.cpp View File

@@ -38,8 +38,7 @@ class ActionMessage : public Message
public:
const String message;
ActionMessage (const String& messageText,
void* const listener_) throw()
ActionMessage (const String& messageText, void* const listener_) throw()
: message (messageText)
{
pointerParameter = listener_;
@@ -56,15 +55,15 @@ private:
};
//==============================================================================
ActionListenerList::ActionListenerList() throw()
ActionListenerList::ActionListenerList()
{
}
ActionListenerList::~ActionListenerList() throw()
ActionListenerList::~ActionListenerList()
{
}
void ActionListenerList::addActionListener (ActionListener* const listener) throw()
void ActionListenerList::addActionListener (ActionListener* const listener)
{
const ScopedLock sl (actionListenerLock_);
@@ -75,7 +74,7 @@ void ActionListenerList::addActionListener (ActionListener* const listener) thro
actionListeners_.add (listener);
}
void ActionListenerList::removeActionListener (ActionListener* const listener) throw()
void ActionListenerList::removeActionListener (ActionListener* const listener)
{
const ScopedLock sl (actionListenerLock_);
@@ -84,7 +83,7 @@ void ActionListenerList::removeActionListener (ActionListener* const listener)
actionListeners_.removeValue (listener);
}
void ActionListenerList::removeAllActionListeners() throw()
void ActionListenerList::removeAllActionListeners()
{
const ScopedLock sl (actionListenerLock_);
actionListeners_.clear();


+ 5
- 5
src/events/juce_ActionListenerList.h View File

@@ -46,26 +46,26 @@ class JUCE_API ActionListenerList : public MessageListener
public:
//==============================================================================
/** Creates an empty list. */
ActionListenerList() throw();
ActionListenerList();
/** Destructor. */
~ActionListenerList() throw();
~ActionListenerList();
//==============================================================================
/** Adds a listener to the list.
(Trying to add a listener that's already on the list will have no effect).
*/
void addActionListener (ActionListener* listener) throw();
void addActionListener (ActionListener* listener);
/** Removes a listener from the list.
If the listener isn't on the list, this won't have any effect.
*/
void removeActionListener (ActionListener* listener) throw();
void removeActionListener (ActionListener* listener);
/** Removes all listeners from the list. */
void removeAllActionListeners() throw();
void removeAllActionListeners();
/** Broadcasts a message to all the registered listeners.


+ 1
- 1
src/events/juce_AsyncUpdater.cpp View File

@@ -41,7 +41,7 @@ AsyncUpdater::~AsyncUpdater()
{
}
void AsyncUpdater::triggerAsyncUpdate() throw()
void AsyncUpdater::triggerAsyncUpdate()
{
if (! asyncMessagePending)
{


+ 2
- 2
src/events/juce_AsyncUpdater.h View File

@@ -64,7 +64,7 @@ public:
It's thread-safe to call this method from any number of threads without
needing to worry about locking.
*/
void triggerAsyncUpdate() throw();
void triggerAsyncUpdate();
/** This will stop any pending updates from happening.
@@ -96,7 +96,7 @@ private:
class AsyncUpdaterInternal : public MessageListener
{
public:
AsyncUpdaterInternal() throw() {}
AsyncUpdaterInternal() {}
~AsyncUpdaterInternal() {}
void handleMessage (const Message&);


+ 4
- 4
src/events/juce_ChangeBroadcaster.cpp View File

@@ -44,12 +44,12 @@ ChangeBroadcaster::~ChangeBroadcaster()
jassert (MessageManager::instance != 0);
}
void ChangeBroadcaster::addChangeListener (ChangeListener* const listener) throw()
void ChangeBroadcaster::addChangeListener (ChangeListener* const listener)
{
changeListenerList.addChangeListener (listener);
}
void ChangeBroadcaster::removeChangeListener (ChangeListener* const listener) throw()
void ChangeBroadcaster::removeChangeListener (ChangeListener* const listener)
{
jassert (changeListenerList.isValidMessageListener());
@@ -57,12 +57,12 @@ void ChangeBroadcaster::removeChangeListener (ChangeListener* const listener) th
changeListenerList.removeChangeListener (listener);
}
void ChangeBroadcaster::removeAllChangeListeners() throw()
void ChangeBroadcaster::removeAllChangeListeners()
{
changeListenerList.removeAllChangeListeners();
}
void ChangeBroadcaster::sendChangeMessage (void* objectThatHasChanged) throw()
void ChangeBroadcaster::sendChangeMessage (void* objectThatHasChanged)
{
changeListenerList.sendChangeMessage (objectThatHasChanged);
}


+ 4
- 4
src/events/juce_ChangeBroadcaster.h View File

@@ -52,16 +52,16 @@ public:
(Trying to add a listener that's already on the list will have no effect).
*/
void addChangeListener (ChangeListener* listener) throw();
void addChangeListener (ChangeListener* listener);
/** Removes a listener from the list.
If the listener isn't on the list, this won't have any effect.
*/
void removeChangeListener (ChangeListener* listener) throw();
void removeChangeListener (ChangeListener* listener);
/** Removes all listeners from the list. */
void removeAllChangeListeners() throw();
void removeAllChangeListeners();
//==============================================================================
/** Broadcasts a change message to all the registered listeners.
@@ -72,7 +72,7 @@ public:
@see ChangeListenerList::sendActionMessage
*/
void sendChangeMessage (void* objectThatHasChanged) throw();
void sendChangeMessage (void* objectThatHasChanged);
/** Sends a synchronous change message to all the registered listeners.


+ 6
- 6
src/events/juce_ChangeListenerList.cpp View File

@@ -31,17 +31,17 @@ BEGIN_JUCE_NAMESPACE
//==============================================================================
ChangeListenerList::ChangeListenerList() throw()
ChangeListenerList::ChangeListenerList()
: lastChangedObject (0),
messagePending (false)
{
}
ChangeListenerList::~ChangeListenerList() throw()
ChangeListenerList::~ChangeListenerList()
{
}
void ChangeListenerList::addChangeListener (ChangeListener* const listener) throw()
void ChangeListenerList::addChangeListener (ChangeListener* const listener)
{
const ScopedLock sl (lock);
@@ -51,19 +51,19 @@ void ChangeListenerList::addChangeListener (ChangeListener* const listener) thro
listeners.add (listener);
}
void ChangeListenerList::removeChangeListener (ChangeListener* const listener) throw()
void ChangeListenerList::removeChangeListener (ChangeListener* const listener)
{
const ScopedLock sl (lock);
listeners.removeValue (listener);
}
void ChangeListenerList::removeAllChangeListeners() throw()
void ChangeListenerList::removeAllChangeListeners()
{
const ScopedLock sl (lock);
listeners.clear();
}
void ChangeListenerList::sendChangeMessage (void* const objectThatHasChanged) throw()
void ChangeListenerList::sendChangeMessage (void* const objectThatHasChanged)
{
const ScopedLock sl (lock);


+ 6
- 6
src/events/juce_ChangeListenerList.h View File

@@ -46,26 +46,26 @@ class JUCE_API ChangeListenerList : public MessageListener
public:
//==============================================================================
/** Creates an empty list. */
ChangeListenerList() throw();
ChangeListenerList();
/** Destructor. */
~ChangeListenerList() throw();
~ChangeListenerList();
//==============================================================================
/** Adds a listener to the list.
(Trying to add a listener that's already on the list will have no effect).
*/
void addChangeListener (ChangeListener* listener) throw();
void addChangeListener (ChangeListener* listener);
/** Removes a listener from the list.
If the listener isn't on the list, this won't have any effect.
*/
void removeChangeListener (ChangeListener* listener) throw();
void removeChangeListener (ChangeListener* listener);
/** Removes all listeners from the list. */
void removeAllChangeListeners() throw();
void removeAllChangeListeners();
//==============================================================================
/** Posts an asynchronous change message to all the listeners.
@@ -85,7 +85,7 @@ public:
and can be any value the application needs
@see sendSynchronousChangeMessage
*/
void sendChangeMessage (void* objectThatHasChanged) throw();
void sendChangeMessage (void* objectThatHasChanged);
/** This will synchronously callback all the ChangeListeners.


+ 1
- 1
src/events/juce_MessageManager.h View File

@@ -140,7 +140,7 @@ public:
method of the broadcast listeners in the other app.
@see registerBroadcastListener, ActionListener
*/
static void broadcastMessage (const String& messageText) throw();
static void broadcastMessage (const String& messageText);
/** Registers a listener to get told about broadcast messages.


+ 10
- 10
src/gui/components/controls/juce_TextEditor.cpp View File

@@ -965,6 +965,12 @@ namespace TextEditorDefs
const int focusLossMessageId = 0x10003004;
const int maxActionsPerTransaction = 100;
static int getCharacterCategory (const juce_wchar character)
{
return CharacterFunctions::isLetterOrDigit (character)
? 2 : (CharacterFunctions::isWhitespace (character) ? 0 : 1);
}
}
//==============================================================================
@@ -2559,12 +2565,6 @@ int TextEditor::indexAtPosition (const float x, const float y)
}
//==============================================================================
static int getCharacterCategory (const juce_wchar character)
{
return CharacterFunctions::isLetterOrDigit (character)
? 2 : (CharacterFunctions::isWhitespace (character) ? 0 : 1);
}
int TextEditor::findWordBreakAfter (const int position) const
{
const String t (getTextInRange (Range<int> (position, position + 512)));
@@ -2574,9 +2574,9 @@ int TextEditor::findWordBreakAfter (const int position) const
while (i < totalLength && CharacterFunctions::isWhitespace (t[i]))
++i;
const int type = getCharacterCategory (t[i]);
const int type = TextEditorDefs::getCharacterCategory (t[i]);
while (i < totalLength && type == getCharacterCategory (t[i]))
while (i < totalLength && type == TextEditorDefs::getCharacterCategory (t[i]))
++i;
while (i < totalLength && CharacterFunctions::isWhitespace (t[i]))
@@ -2600,9 +2600,9 @@ int TextEditor::findWordBreakBefore (const int position) const
if (i > 0)
{
const int type = getCharacterCategory (t [i - 1]);
const int type = TextEditorDefs::getCharacterCategory (t [i - 1]);
while (i > 0 && type == getCharacterCategory (t [i - 1]))
while (i > 0 && type == TextEditorDefs::getCharacterCategory (t [i - 1]))
--i;
}


+ 1
- 1
src/io/network/juce_URL.cpp View File

@@ -104,7 +104,7 @@ static const String getMangledParameters (const StringPairArray& parameters)
for (int i = 0; i < parameters.size(); ++i)
{
if (i > 0)
p += '&';
p << '&';
p << URL::addEscapeChars (parameters.getAllKeys() [i], true)
<< '='


+ 5
- 8
src/io/streams/juce_OutputStream.cpp View File

@@ -36,8 +36,7 @@ BEGIN_JUCE_NAMESPACE
//==============================================================================
#if JUCE_DEBUG
static CriticalSection activeStreamLock;
static Array<void*> activeStreams;
static Array<void*, CriticalSection> activeStreams;
void juce_CheckForDanglingStreams()
{
@@ -54,18 +53,16 @@ void juce_CheckForDanglingStreams()
//==============================================================================
OutputStream::OutputStream()
{
#if JUCE_DEBUG
const ScopedLock sl (activeStreamLock);
#if JUCE_DEBUG
activeStreams.add (this);
#endif
#endif
}
OutputStream::~OutputStream()
{
#if JUCE_DEBUG
const ScopedLock sl (activeStreamLock);
#if JUCE_DEBUG
activeStreams.removeValue (this);
#endif
#endif
}
//==============================================================================


+ 0
- 3
src/native/linux/juce_linux_Audio.cpp View File

@@ -27,9 +27,6 @@
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_ALSA
//==============================================================================
static const int maxNumChans = 64;
//==============================================================================
static void getDeviceSampleRates (snd_pcm_t* handle, Array <int>& rates)


+ 6
- 12
src/native/linux/juce_linux_JackAudio.cpp View File

@@ -91,18 +91,12 @@ static void jack_Log (const String& s)
static void dumpJackErrorMessage (const jack_status_t status)
{
if (status & JackServerFailed || status & JackServerError)
jack_Log ("Unable to connect to JACK server");
if (status & JackVersionError)
jack_Log ("Client's protocol version does not match");
if (status & JackInvalidOption)
jack_Log ("The operation contained an invalid or unsupported option");
if (status & JackNameNotUnique)
jack_Log ("The desired client name was not unique");
if (status & JackNoSuchClient)
jack_Log ("Requested client does not exist");
if (status & JackInitFailure)
jack_Log ("Unable to initialize client");
if (status & JackServerFailed || status & JackServerError) jack_Log ("Unable to connect to JACK server");
if (status & JackVersionError) jack_Log ("Client's protocol version does not match");
if (status & JackInvalidOption) jack_Log ("The operation contained an invalid or unsupported option");
if (status & JackNameNotUnique) jack_Log ("The desired client name was not unique");
if (status & JackNoSuchClient) jack_Log ("Requested client does not exist");
if (status & JackInitFailure) jack_Log ("Unable to initialize client");
}
#else
#define dumpJackErrorMessage(a) {}


+ 2
- 3
src/native/linux/juce_linux_Messaging.cpp View File

@@ -387,13 +387,12 @@ bool juce_postMessageToSystemQueue (Message* message)
return true;
}
void MessageManager::broadcastMessage (const String& value) throw()
void MessageManager::broadcastMessage (const String& value)
{
/* TODO */
}
void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* func,
void* parameter)
void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* func, void* parameter)
{
if (LinuxErrorHandling::errorOccurred)
return 0;


+ 11
- 11
src/native/linux/juce_linux_Midi.cpp View File

@@ -29,9 +29,9 @@
#if JUCE_ALSA
//==============================================================================
static snd_seq_t* iterateDevices (const bool forInput,
StringArray& deviceNamesFound,
const int deviceIndexToOpen)
static snd_seq_t* iterateMidiDevices (const bool forInput,
StringArray& deviceNamesFound,
const int deviceIndexToOpen)
{
snd_seq_t* returnedHandle = 0;
snd_seq_t* seqHandle;
@@ -118,8 +118,8 @@ static snd_seq_t* iterateDevices (const bool forInput,
return returnedHandle;
}
static snd_seq_t* createDevice (const bool forInput,
const String& deviceNameToOpen)
static snd_seq_t* createMidiDevice (const bool forInput,
const String& deviceNameToOpen)
{
snd_seq_t* seqHandle = 0;
@@ -208,7 +208,7 @@ private:
const StringArray MidiOutput::getDevices()
{
StringArray devices;
iterateDevices (false, devices, -1);
iterateMidiDevices (false, devices, -1);
return devices;
}
@@ -222,7 +222,7 @@ MidiOutput* MidiOutput::openDevice (int deviceIndex)
MidiOutput* newDevice = 0;
StringArray devices;
snd_seq_t* const handle = iterateDevices (false, devices, deviceIndex);
snd_seq_t* const handle = iterateMidiDevices (false, devices, deviceIndex);
if (handle != 0)
{
@@ -237,7 +237,7 @@ MidiOutput* MidiOutput::createNewDevice (const String& deviceName)
{
MidiOutput* newDevice = 0;
snd_seq_t* const handle = createDevice (false, deviceName);
snd_seq_t* const handle = createMidiDevice (false, deviceName);
if (handle != 0)
{
@@ -385,7 +385,7 @@ int MidiInput::getDefaultDeviceIndex()
const StringArray MidiInput::getDevices()
{
StringArray devices;
iterateDevices (true, devices, -1);
iterateMidiDevices (true, devices, -1);
return devices;
}
@@ -394,7 +394,7 @@ MidiInput* MidiInput::openDevice (int deviceIndex, MidiInputCallback* callback)
MidiInput* newDevice = 0;
StringArray devices;
snd_seq_t* const handle = iterateDevices (true, devices, deviceIndex);
snd_seq_t* const handle = iterateMidiDevices (true, devices, deviceIndex);
if (handle != 0)
{
@@ -409,7 +409,7 @@ MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallba
{
MidiInput* newDevice = 0;
snd_seq_t* const handle = createDevice (true, deviceName);
snd_seq_t* const handle = createMidiDevice (true, deviceName);
if (handle != 0)
{


+ 2
- 3
src/native/mac/juce_iphone_MessageManager.mm View File

@@ -177,12 +177,11 @@ bool juce_postMessageToSystemQueue (Message* message)
return true;
}
void MessageManager::broadcastMessage (const String& value) throw()
void MessageManager::broadcastMessage (const String& value)
{
}
void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* callback,
void* data)
void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* callback, void* data)
{
if (isThisTheMessageThread())
{


+ 4
- 2
src/native/mac/juce_mac_MessageManager.mm View File

@@ -393,7 +393,9 @@ static bool isEventBlockedByModalComps (NSEvent* e)
}
else
{
if (JUCEApplication::isStandaloneApp()
NSViewComponentPeer* nsViewPeer = dynamic_cast<NSViewComponentPeer*> (peer);
if ((nsViewPeer == 0 || ! nsViewPeer->isSharedWindow)
? NSPointInRect ([e locationInWindow], NSMakeRect (0, 0, [w frame].size.width, [w frame].size.height))
: NSPointInRect ([compView convertPoint: [e locationInWindow] fromView: nil], [compView bounds]))
return false;
@@ -472,7 +474,7 @@ bool juce_postMessageToSystemQueue (Message* message)
return true;
}
void MessageManager::broadcastMessage (const String& value) throw()
void MessageManager::broadcastMessage (const String& value)
{
}


+ 10
- 17
src/native/windows/juce_win32_ASIO.cpp View File

@@ -30,9 +30,9 @@
#undef WINDOWS
//==============================================================================
// #define ASIO_DEBUGGING
// #define ASIO_DEBUGGING 1
#ifdef ASIO_DEBUGGING
#if ASIO_DEBUGGING
#define log(a) { Logger::writeToLog (a); DBG (a) }
#else
#define log(a) {}
@@ -40,25 +40,18 @@
//==============================================================================
#ifdef ASIO_DEBUGGING
#if ASIO_DEBUGGING
static void logError (const String& context, long error)
{
String err ("unknown error");
if (error == ASE_NotPresent)
err = "Not Present";
else if (error == ASE_HWMalfunction)
err = "Hardware Malfunction";
else if (error == ASE_InvalidParameter)
err = "Invalid Parameter";
else if (error == ASE_InvalidMode)
err = "Invalid Mode";
else if (error == ASE_SPNotAdvancing)
err = "Sample position not advancing";
else if (error == ASE_NoClock)
err = "No Clock";
else if (error == ASE_NoMemory)
err = "Out of memory";
if (error == ASE_NotPresent) err = "Not Present";
else if (error == ASE_HWMalfunction) err = "Hardware Malfunction";
else if (error == ASE_InvalidParameter) err = "Invalid Parameter";
else if (error == ASE_InvalidMode) err = "Invalid Mode";
else if (error == ASE_SPNotAdvancing) err = "Sample position not advancing";
else if (error == ASE_NoClock) err = "No Clock";
else if (error == ASE_NoMemory) err = "Out of memory";
log ("!!error: " + context + " - " + err);
}


+ 1
- 1
src/native/windows/juce_win32_Messaging.cpp View File

@@ -218,7 +218,7 @@ static BOOL CALLBACK BroadcastEnumWindowProc (HWND hwnd, LPARAM lParam)
return TRUE;
}
void MessageManager::broadcastMessage (const String& value) throw()
void MessageManager::broadcastMessage (const String& value)
{
Array<void*> windows;
EnumWindows (&BroadcastEnumWindowProc, (LPARAM) &windows);


Loading…
Cancel
Save