| @@ -1101,18 +1101,18 @@ private: | |||
| 0, | |||
| pointers, | |||
| &propertySize) != noErr) | |||
| return 0; | |||
| return nil; | |||
| AudioProcessor* filter = (AudioProcessor*) pointers[0]; | |||
| JuceAU* au = (JuceAU*) pointers[1]; | |||
| if (filter == nullptr) | |||
| return 0; | |||
| return nil; | |||
| AudioProcessorEditor* editorComp = filter->createEditorIfNeeded(); | |||
| if (editorComp == nullptr) | |||
| return 0; | |||
| return nil; | |||
| return [[[JuceUIViewClass alloc] initWithFilter: filter | |||
| withAU: au | |||
| @@ -1470,7 +1470,7 @@ namespace | |||
| catch (...) | |||
| {} | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| } | |||
| @@ -73,7 +73,7 @@ namespace JuceDummyNamespace {} | |||
| */ | |||
| #define JUCE_MAJOR_VERSION 1 | |||
| #define JUCE_MINOR_VERSION 53 | |||
| #define JUCE_BUILDNUMBER 69 | |||
| #define JUCE_BUILDNUMBER 70 | |||
| /** Current Juce version number. | |||
| @@ -9139,7 +9139,7 @@ public: | |||
| l = &(l->item->nextListItem); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| /** Copies the items in the list to an array. | |||
| @@ -14947,7 +14947,7 @@ public: | |||
| return removed; | |||
| } | |||
| return 0; | |||
| return ElementType(); | |||
| } | |||
| /** Removes an item from the set. | |||
| @@ -16484,7 +16484,7 @@ public: | |||
| If it's not possible to merge the two actions, the method should return zero. | |||
| */ | |||
| virtual UndoableAction* createCoalescedAction (UndoableAction* nextAction) { (void) nextAction; return 0; } | |||
| virtual UndoableAction* createCoalescedAction (UndoableAction* nextAction) { (void) nextAction; return nullptr; } | |||
| }; | |||
| #endif // __JUCE_UNDOABLEACTION_JUCEHEADER__ | |||
| @@ -31206,7 +31206,7 @@ public: | |||
| p = p->parentComponent; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| /** Returns the highest-level component which contains this one or its parents. | |||
| @@ -47375,7 +47375,7 @@ public: | |||
| bool producesMidi() const; | |||
| bool hasEditor() const { return false; } | |||
| AudioProcessorEditor* createEditor() { return 0; } | |||
| AudioProcessorEditor* createEditor() { return nullptr; } | |||
| int getNumParameters() { return 0; } | |||
| const String getParameterName (int) { return String::empty; } | |||
| @@ -54259,7 +54259,7 @@ public: | |||
| component you like. It's most useful if you're doing things like drag-and-drop | |||
| of items, or want to use a Label component to edit item names, etc. | |||
| */ | |||
| virtual Component* createItemComponent() { return 0; } | |||
| virtual Component* createItemComponent() { return nullptr; } | |||
| /** Draws the item's contents. | |||
| @@ -112,7 +112,7 @@ void JUCEApplication::sendUnhandledException (const std::exception* const e, | |||
| //============================================================================== | |||
| ApplicationCommandTarget* JUCEApplication::getNextCommandTarget() | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void JUCEApplication::getAllCommands (Array <CommandID>& commands) | |||
| @@ -136,7 +136,7 @@ const ApplicationCommandInfo* ApplicationCommandManager::getCommandForID (const | |||
| if (commands.getUnchecked(i)->commandID == commandID) | |||
| return commands.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const String ApplicationCommandManager::getNameOfCommand (const CommandID commandID) const noexcept | |||
| @@ -76,7 +76,7 @@ ApplicationCommandTarget* ApplicationCommandTarget::findFirstTargetParentCompone | |||
| // (unable to use the syntax findParentComponentOfClass <ApplicationCommandTarget> () because of a VC6 compiler bug) | |||
| return c->findParentComponentOfClass ((ApplicationCommandTarget*) 0); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| ApplicationCommandTarget* ApplicationCommandTarget::getTargetForCommand (const CommandID commandID) | |||
| @@ -116,7 +116,7 @@ ApplicationCommandTarget* ApplicationCommandTarget::getTargetForCommand (const C | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| bool ApplicationCommandTarget::isCommandActive (const CommandID commandID) | |||
| @@ -409,7 +409,7 @@ AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream, | |||
| if (! deleteStreamIfOpeningFails) | |||
| w->input = nullptr; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioFormatWriter* AiffAudioFormat::createWriterFor (OutputStream* out, | |||
| @@ -422,7 +422,7 @@ AudioFormatWriter* AiffAudioFormat::createWriterFor (OutputStream* out, | |||
| if (getPossibleBitDepths().contains (bitsPerSample)) | |||
| return new AiffAudioFormatWriter (out, sampleRate, numberOfChannels, bitsPerSample); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -120,7 +120,7 @@ AudioFormat* AudioFormatManager::findFormatForFileExtension (const String& fileE | |||
| if (getKnownFormat(i)->getFileExtensions().contains (e, true)) | |||
| return getKnownFormat(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const String AudioFormatManager::getWildcardForAllFormats() const | |||
| @@ -176,7 +176,7 @@ AudioFormatReader* AudioFormatManager::createReaderFor (const File& file) | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioFormatReader* AudioFormatManager::createReaderFor (InputStream* audioFileStream) | |||
| @@ -209,7 +209,7 @@ AudioFormatReader* AudioFormatManager::createReaderFor (InputStream* audioFileSt | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| @@ -60,7 +60,7 @@ ThumbnailCacheEntry* AudioThumbnailCache::findThumbFor (const int64 hash) const | |||
| if (thumbs.getUnchecked(i)->hash == hash) | |||
| return thumbs.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| bool AudioThumbnailCache::loadThumb (AudioThumbnail& thumb, const int64 hashCode) | |||
| @@ -513,7 +513,7 @@ AudioFormatReader* FlacAudioFormat::createReaderFor (InputStream* in, | |||
| if (! deleteStreamIfOpeningFails) | |||
| r->input = nullptr; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioFormatWriter* FlacAudioFormat::createWriterFor (OutputStream* out, | |||
| @@ -531,7 +531,7 @@ AudioFormatWriter* FlacAudioFormat::createWriterFor (OutputStream* out, | |||
| return w.release(); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -427,7 +427,7 @@ AudioFormatReader* OggVorbisAudioFormat::createReaderFor (InputStream* in, | |||
| if (! deleteStreamIfOpeningFails) | |||
| r->input = nullptr; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioFormatWriter* OggVorbisAudioFormat::createWriterFor (OutputStream* out, | |||
| @@ -443,7 +443,7 @@ AudioFormatWriter* OggVorbisAudioFormat::createWriterFor (OutputStream* out, | |||
| bitsPerSample, | |||
| qualityOptionIndex)); | |||
| return w->ok ? w.release() : 0; | |||
| return w->ok ? w.release() : nullptr; | |||
| } | |||
| const StringArray OggVorbisAudioFormat::getQualityOptions() | |||
| @@ -374,7 +374,7 @@ AudioFormatReader* QuickTimeAudioFormat::createReaderFor (InputStream* sourceStr | |||
| if (! deleteStreamIfOpeningFails) | |||
| r->input = 0; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioFormatWriter* QuickTimeAudioFormat::createWriterFor (OutputStream* /*streamToWriteTo*/, | |||
| @@ -385,7 +385,7 @@ AudioFormatWriter* QuickTimeAudioFormat::createWriterFor (OutputStream* /*stream | |||
| int /*qualityOptionIndex*/) | |||
| { | |||
| jassertfalse; // not yet implemented! | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -725,7 +725,7 @@ AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream, | |||
| if (! deleteStreamIfOpeningFails) | |||
| r->input = nullptr; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioFormatWriter* WavAudioFormat::createWriterFor (OutputStream* out, double sampleRate, | |||
| @@ -735,7 +735,7 @@ AudioFormatWriter* WavAudioFormat::createWriterFor (OutputStream* out, double sa | |||
| if (getPossibleBitDepths().contains (bitsPerSample)) | |||
| return new WavAudioFormatWriter (out, sampleRate, numChannels, bitsPerSample, metadataValues); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| namespace WavFileHelpers | |||
| @@ -249,7 +249,7 @@ void AudioDeviceManager::insertDefaultDeviceNames (AudioDeviceSetup& setup) cons | |||
| XmlElement* AudioDeviceManager::createStateXml() const | |||
| { | |||
| return lastExplicitSettings != nullptr ? new XmlElement (*lastExplicitSettings) : 0; | |||
| return lastExplicitSettings != nullptr ? new XmlElement (*lastExplicitSettings) : nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -281,7 +281,7 @@ AudioIODeviceType* AudioDeviceManager::findType (const String& inputName, const | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void AudioDeviceManager::getAudioDeviceSetup (AudioDeviceSetup& setup) | |||
| @@ -41,35 +41,35 @@ AudioIODeviceType::~AudioIODeviceType() | |||
| } | |||
| #if ! JUCE_MAC | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_CoreAudio() { return 0; } | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_CoreAudio() { return nullptr; } | |||
| #endif | |||
| #if ! JUCE_IOS | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_iOSAudio() { return 0; } | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_iOSAudio() { return nullptr; } | |||
| #endif | |||
| #if ! (JUCE_WINDOWS && JUCE_WASAPI) | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_WASAPI() { return 0; } | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_WASAPI() { return nullptr; } | |||
| #endif | |||
| #if ! (JUCE_WINDOWS && JUCE_DIRECTSOUND) | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_DirectSound() { return 0; } | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_DirectSound() { return nullptr; } | |||
| #endif | |||
| #if ! (JUCE_WINDOWS && JUCE_ASIO) | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_ASIO() { return 0; } | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_ASIO() { return nullptr; } | |||
| #endif | |||
| #if ! (JUCE_LINUX && JUCE_ALSA) | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_ALSA() { return 0; } | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_ALSA() { return nullptr; } | |||
| #endif | |||
| #if ! (JUCE_LINUX && JUCE_JACK) | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_JACK() { return 0; } | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_JACK() { return nullptr; } | |||
| #endif | |||
| #if ! JUCE_ANDROID | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_Android() { return 0; } | |||
| AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_Android() { return nullptr; } | |||
| #endif | |||
| @@ -191,9 +191,9 @@ void AudioDataConverters::convertFloatToFloat32LE (const float* source, void* de | |||
| { | |||
| *(float*) d = source[i]; | |||
| #if JUCE_BIG_ENDIAN | |||
| #if JUCE_BIG_ENDIAN | |||
| *(uint32*) d = ByteOrder::swap (*(uint32*) d); | |||
| #endif | |||
| #endif | |||
| d += destBytesPerSample; | |||
| } | |||
| @@ -209,9 +209,9 @@ void AudioDataConverters::convertFloatToFloat32BE (const float* source, void* de | |||
| { | |||
| *(float*) d = source[i]; | |||
| #if JUCE_LITTLE_ENDIAN | |||
| #if JUCE_LITTLE_ENDIAN | |||
| *(uint32*) d = ByteOrder::swap (*(uint32*) d); | |||
| #endif | |||
| #endif | |||
| d += destBytesPerSample; | |||
| } | |||
| @@ -376,10 +376,10 @@ void AudioDataConverters::convertFloat32LEToFloat (const void* const source, flo | |||
| { | |||
| dest[i] = *(float*)s; | |||
| #if JUCE_BIG_ENDIAN | |||
| #if JUCE_BIG_ENDIAN | |||
| uint32* const d = (uint32*) (dest + i); | |||
| *d = ByteOrder::swap (*d); | |||
| #endif | |||
| #endif | |||
| s += srcBytesPerSample; | |||
| } | |||
| @@ -393,10 +393,10 @@ void AudioDataConverters::convertFloat32BEToFloat (const void* const source, flo | |||
| { | |||
| dest[i] = *(float*)s; | |||
| #if JUCE_LITTLE_ENDIAN | |||
| #if JUCE_LITTLE_ENDIAN | |||
| uint32* const d = (uint32*) (dest + i); | |||
| *d = ByteOrder::swap (*d); | |||
| #endif | |||
| #endif | |||
| s += srcBytesPerSample; | |||
| } | |||
| @@ -411,41 +411,15 @@ void AudioDataConverters::convertFloatToFormat (const DataFormat destFormat, | |||
| { | |||
| switch (destFormat) | |||
| { | |||
| case int16LE: | |||
| convertFloatToInt16LE (source, dest, numSamples); | |||
| break; | |||
| case int16BE: | |||
| convertFloatToInt16BE (source, dest, numSamples); | |||
| break; | |||
| case int24LE: | |||
| convertFloatToInt24LE (source, dest, numSamples); | |||
| break; | |||
| case int24BE: | |||
| convertFloatToInt24BE (source, dest, numSamples); | |||
| break; | |||
| case int32LE: | |||
| convertFloatToInt32LE (source, dest, numSamples); | |||
| break; | |||
| case int32BE: | |||
| convertFloatToInt32BE (source, dest, numSamples); | |||
| break; | |||
| case float32LE: | |||
| convertFloatToFloat32LE (source, dest, numSamples); | |||
| break; | |||
| case float32BE: | |||
| convertFloatToFloat32BE (source, dest, numSamples); | |||
| break; | |||
| default: | |||
| jassertfalse; | |||
| break; | |||
| case int16LE: convertFloatToInt16LE (source, dest, numSamples); break; | |||
| case int16BE: convertFloatToInt16BE (source, dest, numSamples); break; | |||
| case int24LE: convertFloatToInt24LE (source, dest, numSamples); break; | |||
| case int24BE: convertFloatToInt24BE (source, dest, numSamples); break; | |||
| case int32LE: convertFloatToInt32LE (source, dest, numSamples); break; | |||
| case int32BE: convertFloatToInt32BE (source, dest, numSamples); break; | |||
| case float32LE: convertFloatToFloat32LE (source, dest, numSamples); break; | |||
| case float32BE: convertFloatToFloat32BE (source, dest, numSamples); break; | |||
| default: jassertfalse; break; | |||
| } | |||
| } | |||
| @@ -456,41 +430,15 @@ void AudioDataConverters::convertFormatToFloat (const DataFormat sourceFormat, | |||
| { | |||
| switch (sourceFormat) | |||
| { | |||
| case int16LE: | |||
| convertInt16LEToFloat (source, dest, numSamples); | |||
| break; | |||
| case int16BE: | |||
| convertInt16BEToFloat (source, dest, numSamples); | |||
| break; | |||
| case int24LE: | |||
| convertInt24LEToFloat (source, dest, numSamples); | |||
| break; | |||
| case int24BE: | |||
| convertInt24BEToFloat (source, dest, numSamples); | |||
| break; | |||
| case int32LE: | |||
| convertInt32LEToFloat (source, dest, numSamples); | |||
| break; | |||
| case int32BE: | |||
| convertInt32BEToFloat (source, dest, numSamples); | |||
| break; | |||
| case float32LE: | |||
| convertFloat32LEToFloat (source, dest, numSamples); | |||
| break; | |||
| case float32BE: | |||
| convertFloat32BEToFloat (source, dest, numSamples); | |||
| break; | |||
| default: | |||
| jassertfalse; | |||
| break; | |||
| case int16LE: convertInt16LEToFloat (source, dest, numSamples); break; | |||
| case int16BE: convertInt16BEToFloat (source, dest, numSamples); break; | |||
| case int24LE: convertInt24LEToFloat (source, dest, numSamples); break; | |||
| case int24BE: convertInt24BEToFloat (source, dest, numSamples); break; | |||
| case int32LE: convertInt32LEToFloat (source, dest, numSamples); break; | |||
| case int32BE: convertInt32BEToFloat (source, dest, numSamples); break; | |||
| case float32LE: convertFloat32LEToFloat (source, dest, numSamples); break; | |||
| case float32BE: convertFloat32BEToFloat (source, dest, numSamples); break; | |||
| default: jassertfalse; break; | |||
| } | |||
| } | |||
| @@ -532,6 +480,7 @@ void AudioDataConverters::deinterleaveSamples (const float* const source, | |||
| } | |||
| //============================================================================== | |||
| #if JUCE_UNIT_TESTS | |||
| #include "../../utilities/juce_UnitTest.h" | |||
| @@ -566,7 +566,7 @@ const MidiMessage MidiMessage::createSysExMessage (const uint8* sysexData, const | |||
| const uint8* MidiMessage::getSysExData() const noexcept | |||
| { | |||
| return isSysEx() ? getRawData() + 1 : 0; | |||
| return isSysEx() ? getRawData() + 1 : nullptr; | |||
| } | |||
| int MidiMessage::getSysExDataSize() const noexcept | |||
| @@ -1491,7 +1491,7 @@ AudioPluginInstance* AudioUnitPluginFormat::createInstanceFromDescription (const | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const StringArray AudioUnitPluginFormat::searchPathsForPlugins (const FileSearchPath& /*directoriesToSearch*/, | |||
| @@ -648,7 +648,7 @@ public: | |||
| static void* newMachOFromCFM (void* cfmfp) | |||
| { | |||
| if (cfmfp == 0) | |||
| return 0; | |||
| return nullptr; | |||
| UInt32* const mfp = new UInt32[6]; | |||
| @@ -1874,7 +1874,7 @@ AudioProcessorEditor* VSTPluginInstance::createEditor() | |||
| if (hasEditor()) | |||
| return new VSTPluginWindow (*this); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| @@ -43,7 +43,7 @@ AudioPluginInstance::~AudioPluginInstance() | |||
| void* AudioPluginInstance::getPlatformSpecificData() | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -55,7 +55,7 @@ PluginDescription* KnownPluginList::getTypeForFile (const String& fileOrIdentifi | |||
| if (types.getUnchecked(i)->fileOrIdentifier == fileOrIdentifier) | |||
| return types.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| PluginDescription* KnownPluginList::getTypeForIdentifierString (const String& identifierString) const | |||
| @@ -64,7 +64,7 @@ PluginDescription* KnownPluginList::getTypeForIdentifierString (const String& id | |||
| if (types.getUnchecked(i)->createIdentifierString() == identifierString) | |||
| return types.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| bool KnownPluginList::addType (const PluginDescription& type) | |||
| @@ -285,7 +285,7 @@ XmlElement* AudioProcessor::getXmlFromBinary (const void* data, | |||
| jmin ((sizeInBytes - 8), stringLength))); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -105,7 +105,7 @@ AudioProcessorGraph::Node* AudioProcessorGraph::getNodeForId (const uint32 nodeI | |||
| if (nodes.getUnchecked(i)->id == nodeId) | |||
| return nodes.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioProcessorGraph::Node* AudioProcessorGraph::addNode (AudioProcessor* const newProcessor, | |||
| @@ -114,7 +114,7 @@ AudioProcessorGraph::Node* AudioProcessorGraph::addNode (AudioProcessor* const n | |||
| if (newProcessor == nullptr) | |||
| { | |||
| jassertfalse; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| if (nodeId == 0) | |||
| @@ -186,7 +186,7 @@ const AudioProcessorGraph::Connection* AudioProcessorGraph::getConnectionBetween | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| bool AudioProcessorGraph::isConnected (const uint32 possibleSourceNodeId, | |||
| @@ -1252,7 +1252,7 @@ bool AudioProcessorGraph::AudioGraphIOProcessor::isOutput() const | |||
| } | |||
| bool AudioProcessorGraph::AudioGraphIOProcessor::hasEditor() const { return false; } | |||
| AudioProcessorEditor* AudioProcessorGraph::AudioGraphIOProcessor::createEditor() { return 0; } | |||
| AudioProcessorEditor* AudioProcessorGraph::AudioGraphIOProcessor::createEditor() { return nullptr; } | |||
| int AudioProcessorGraph::AudioGraphIOProcessor::getNumParameters() { return 0; } | |||
| const String AudioProcessorGraph::AudioGraphIOProcessor::getParameterName (int) { return String::empty; } | |||
| @@ -372,7 +372,7 @@ public: | |||
| bool producesMidi() const; | |||
| bool hasEditor() const { return false; } | |||
| AudioProcessorEditor* createEditor() { return 0; } | |||
| AudioProcessorEditor* createEditor() { return nullptr; } | |||
| int getNumParameters() { return 0; } | |||
| const String getParameterName (int) { return String::empty; } | |||
| @@ -64,7 +64,7 @@ void AudioProcessorPlayer::setProcessor (AudioProcessor* const processorToPlay) | |||
| { | |||
| const ScopedLock sl (lock); | |||
| oldOne = isPrepared ? processor : 0; | |||
| oldOne = isPrepared ? processor : nullptr; | |||
| processor = processorToPlay; | |||
| isPrepared = true; | |||
| } | |||
| @@ -359,7 +359,7 @@ SynthesiserVoice* Synthesiser::findFreeVoice (SynthesiserSound* soundToPlay, | |||
| return oldest; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| @@ -288,7 +288,7 @@ public: | |||
| l = &(l->item->nextListItem); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| /** Copies the items in the list to an array. | |||
| @@ -133,7 +133,7 @@ var* NamedValueSet::getVarPointer (const Identifier& name) const | |||
| if (i->name == name) | |||
| return &(i->value); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| bool NamedValueSet::set (const Identifier& name, const var& newValue) | |||
| @@ -446,7 +446,7 @@ public: | |||
| return removed; | |||
| } | |||
| return 0; | |||
| return ElementType(); | |||
| } | |||
| /** Removes an item from the set. | |||
| @@ -53,7 +53,7 @@ public: | |||
| virtual double toDouble (const ValueUnion&) const { return 0; } | |||
| virtual const String toString (const ValueUnion&) const { return String::empty; } | |||
| virtual bool toBool (const ValueUnion&) const { return false; } | |||
| virtual DynamicObject* toObject (const ValueUnion&) const { return 0; } | |||
| virtual DynamicObject* toObject (const ValueUnion&) const { return nullptr; } | |||
| virtual bool isVoid() const noexcept { return false; } | |||
| virtual bool isInt() const noexcept { return false; } | |||
| @@ -33,7 +33,7 @@ | |||
| */ | |||
| #define JUCE_MAJOR_VERSION 1 | |||
| #define JUCE_MINOR_VERSION 53 | |||
| #define JUCE_BUILDNUMBER 69 | |||
| #define JUCE_BUILDNUMBER 70 | |||
| /** Current Juce version number. | |||
| @@ -469,7 +469,7 @@ void Button::visibilityChanged() | |||
| void Button::parentHierarchyChanged() | |||
| { | |||
| Component* const newKeySource = (shortcuts.size() == 0) ? 0 : getTopLevelComponent(); | |||
| Component* const newKeySource = (shortcuts.size() == 0) ? nullptr : getTopLevelComponent(); | |||
| if (newKeySource != keySource.get()) | |||
| { | |||
| @@ -194,7 +194,7 @@ ComboBox::ItemInfo* ComboBox::getItemForId (const int itemId) const noexcept | |||
| return items.getUnchecked(i); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| ComboBox::ItemInfo* ComboBox::getItemForIndex (const int index) const noexcept | |||
| @@ -208,7 +208,7 @@ ComboBox::ItemInfo* ComboBox::getItemForIndex (const int index) const noexcept | |||
| return item; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| int ComboBox::getNumItems() const noexcept | |||
| @@ -177,7 +177,7 @@ public: | |||
| ListBoxRowComponent* getComponentForRowIfOnscreen (const int row) const noexcept | |||
| { | |||
| return (row >= firstIndex && row < firstIndex + rows.size()) | |||
| ? getComponentForRow (row) : 0; | |||
| ? getComponentForRow (row) : nullptr; | |||
| } | |||
| int getRowNumberOfComponent (Component* const rowComponent) const noexcept | |||
| @@ -631,7 +631,7 @@ int ListBox::getInsertionIndexForPosition (const int x, const int y) const noexc | |||
| Component* ListBox::getComponentForRowNumber (const int row) const noexcept | |||
| { | |||
| ListBoxRowComponent* const listRowComp = viewport->getComponentForRowIfOnscreen (row); | |||
| return listRowComp != nullptr ? static_cast <Component*> (listRowComp->customComponent) : 0; | |||
| return listRowComp != nullptr ? static_cast <Component*> (listRowComp->customComponent) : nullptr; | |||
| } | |||
| int ListBox::getRowNumberOfComponent (Component* const rowComponent) const noexcept | |||
| @@ -942,7 +942,7 @@ Component* ListBoxModel::refreshComponentForRow (int, bool, Component* existingC | |||
| { | |||
| (void) existingComponentToUpdate; | |||
| jassert (existingComponentToUpdate == nullptr); // indicates a failure in the code the recycles the components | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void ListBoxModel::listBoxItemClicked (int, const MouseEvent&) {} | |||
| @@ -808,7 +808,7 @@ TableHeaderComponent::ColumnInfo* TableHeaderComponent::getInfoForId (const int | |||
| if (columns.getUnchecked(i)->id == id) | |||
| return columns.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| int TableHeaderComponent::visibleIndexToTotalIndex (const int visibleIndex) const | |||
| @@ -496,7 +496,7 @@ Component* TableListBoxModel::refreshComponentForCell (int, int, bool, Component | |||
| { | |||
| (void) existingComponentToUpdate; | |||
| jassert (existingComponentToUpdate == nullptr); // indicates a failure in the code the recycles the components | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| @@ -386,7 +386,7 @@ ToolbarItemComponent* Toolbar::getNextActiveComponent (int index, const int delt | |||
| return tc; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void Toolbar::setStyle (const ToolbarItemStyle& newStyle) | |||
| @@ -191,7 +191,7 @@ public: | |||
| return ti; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void updateComponents() | |||
| @@ -399,7 +399,7 @@ private: | |||
| return ri; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| static bool isMouseDraggingInChildCompOf (Component* const comp) | |||
| @@ -607,7 +607,7 @@ TreeViewItem* TreeView::getItemOnRow (int index) const | |||
| if (rootItem != nullptr && index >= 0) | |||
| return rootItem->getItemOnRow (index); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| TreeViewItem* TreeView::getItemAt (int y) const noexcept | |||
| @@ -620,7 +620,7 @@ TreeViewItem* TreeView::getItemAt (int y) const noexcept | |||
| TreeViewItem* TreeView::findItemFromIdentifierString (const String& identifierString) const | |||
| { | |||
| if (rootItem == nullptr) | |||
| return 0; | |||
| return nullptr; | |||
| return rootItem->findItemFromIdentifierString (identifierString); | |||
| } | |||
| @@ -950,7 +950,7 @@ TreeViewItem* TreeView::getInsertPosition (int& x, int& y, int& insertIndex, | |||
| TreeViewItem* item = getItemAt (y); | |||
| if (item == nullptr) | |||
| return 0; | |||
| return nullptr; | |||
| Rectangle<int> itemPos (item->getItemPosition (true)); | |||
| insertIndex = item->getIndexInParent(); | |||
| @@ -1583,7 +1583,7 @@ TreeViewItem* TreeViewItem::getItemOnRow (int index) noexcept | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| TreeViewItem* TreeViewItem::findItemRecursively (int targetY) noexcept | |||
| @@ -1611,7 +1611,7 @@ TreeViewItem* TreeViewItem::findItemRecursively (int targetY) noexcept | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| int TreeViewItem::countSelectedItemsRecursively (int depth) const noexcept | |||
| @@ -1650,7 +1650,7 @@ TreeViewItem* TreeViewItem::getSelectedItemWithIndex (int index) noexcept | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| int TreeViewItem::getRowNumberInTree() const noexcept | |||
| @@ -1697,7 +1697,7 @@ TreeViewItem* TreeViewItem::getNextVisibleItem (const bool recurse) const noexce | |||
| return parentItem->subItems [nextIndex]; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const String TreeViewItem::getItemIdentifierString() const | |||
| @@ -1735,7 +1735,7 @@ TreeViewItem* TreeViewItem::findItemFromIdentifierString (const String& identifi | |||
| setOpen (wasOpen); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void TreeViewItem::restoreOpennessState (const XmlElement& e) noexcept | |||
| @@ -1797,7 +1797,7 @@ XmlElement* TreeViewItem::getOpennessState() const noexcept | |||
| jassertfalse; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -268,7 +268,7 @@ public: | |||
| component you like. It's most useful if you're doing things like drag-and-drop | |||
| of items, or want to use a Label component to edit item names, etc. | |||
| */ | |||
| virtual Component* createItemComponent() { return 0; } | |||
| virtual Component* createItemComponent() { return nullptr; } | |||
| //============================================================================== | |||
| /** Draws the item's contents. | |||
| @@ -565,7 +565,7 @@ void* Component::getWindowHandle() const | |||
| if (peer != nullptr) | |||
| return peer->getNativeHandle(); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -1309,7 +1309,7 @@ Component* Component::getComponentAt (const Point<int>& position) | |||
| return this; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| Component* Component::getComponentAt (const int x, const int y) | |||
| @@ -2087,7 +2087,7 @@ void Component::colourChanged() | |||
| //============================================================================== | |||
| MarkerList* Component::getMarkers (bool /*xAxis*/) | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -3020,7 +3020,7 @@ ComponentPeer* Component::getPeer() const | |||
| if (flags.hasHeavyweightPeerFlag) | |||
| return ComponentPeer::getPeerFor (this); | |||
| else if (parentComponent == nullptr) | |||
| return 0; | |||
| return nullptr; | |||
| return parentComponent->getPeer(); | |||
| } | |||
| @@ -785,7 +785,7 @@ public: | |||
| p = p->parentComponent; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| /** Returns the highest-level component which contains this one or its parents. | |||
| @@ -163,7 +163,7 @@ Component* Desktop::findComponentAt (const Point<int>& screenPosition) const | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -249,7 +249,7 @@ MouseInputSource* Desktop::getDraggingMouseSource (int index) const noexcept | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -172,7 +172,7 @@ Component* ModalComponentManager::getModalComponent (const int index) const | |||
| return item->component; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| bool ModalComponentManager::isModal (Component* const comp) const | |||
| @@ -124,7 +124,7 @@ namespace KeyboardFocusHelpers | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| } | |||
| @@ -218,7 +218,7 @@ ComponentAnimator::AnimationTask* ComponentAnimator::findTaskFor (Component* con | |||
| if (component == tasks.getUnchecked(i)->component.get()) | |||
| return tasks.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void ComponentAnimator::animateComponent (Component* const component, | |||
| @@ -50,7 +50,7 @@ namespace ComponentBuilderHelpers | |||
| return components.removeAndReturn (i); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| Component* findComponentWithID (Component* const c, const String& compId) | |||
| @@ -67,7 +67,7 @@ namespace ComponentBuilderHelpers | |||
| return child; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| Component* createNewComponent (ComponentBuilder::TypeHandler& type, | |||
| @@ -173,7 +173,7 @@ ComponentBuilder::TypeHandler* ComponentBuilder::getHandlerForState (const Value | |||
| return t; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| int ComponentBuilder::getNumHandlers() const noexcept | |||
| @@ -231,7 +231,7 @@ StretchableLayoutManager::ItemLayoutProperties* StretchableLayoutManager::getInf | |||
| if (items.getUnchecked(i)->itemIndex == itemIndex) | |||
| return items.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex, | |||
| @@ -943,7 +943,7 @@ void LookAndFeel::drawScrollbar (Graphics& g, | |||
| ImageEffectFilter* LookAndFeel::getScrollbarEffect() | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| int LookAndFeel::getMinimumScrollbarThumbSize (ScrollBar& scrollbar) | |||
| @@ -1733,7 +1733,7 @@ Label* LookAndFeel::createSliderTextBox (Slider& slider) | |||
| ImageEffectFilter* LookAndFeel::getSliderEffect() | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -2028,7 +2028,7 @@ Button* LookAndFeel::createDocumentWindowButton (int buttonType) | |||
| } | |||
| jassertfalse; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void LookAndFeel::positionDocumentWindowButtons (DocumentWindow&, | |||
| @@ -575,7 +575,7 @@ Button* OldSchoolLookAndFeel::createDocumentWindowButton (int buttonType) | |||
| } | |||
| jassertfalse; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void OldSchoolLookAndFeel::positionDocumentWindowButtons (DocumentWindow&, | |||
| @@ -329,7 +329,7 @@ public: | |||
| minimumWidth, maximumNumColumns, standardItemHeight, dismissOnMouseUp, | |||
| managerOfChosenCommand, componentAttachedTo); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -131,7 +131,7 @@ public: | |||
| hit = hit->getParentComponent(); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void mouseUp (const MouseEvent& e) | |||
| @@ -86,7 +86,7 @@ public: | |||
| return comp->getComponentAt (relativePos); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const Point<int> getScreenPosition() const | |||
| @@ -104,7 +104,7 @@ const MarkerList::Marker* MarkerList::getMarker (const String& name) const noexc | |||
| return m; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void MarkerList::setMarker (const String& name, const RelativeCoordinate& position) | |||
| @@ -95,7 +95,7 @@ Component* RelativeCoordinatePositionerBase::ComponentScope::findSiblingComponen | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const MarkerList::Marker* RelativeCoordinatePositionerBase::ComponentScope::findMarker (const String& name, MarkerList*& list) const | |||
| @@ -194,7 +194,7 @@ void RelativePointPath::CloseSubPath::addToPath (Path& path, Expression::Scope*) | |||
| RelativePoint* RelativePointPath::CloseSubPath::getControlPoints (int& numPoints) | |||
| { | |||
| numPoints = 0; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| RelativePointPath::ElementBase* RelativePointPath::CloseSubPath::clone() const | |||
| @@ -126,7 +126,7 @@ OpenGLContext* OpenGLContext::getCurrentContext() | |||
| return oglc; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| @@ -212,7 +212,7 @@ TextEditor* AlertWindow::getTextEditor (const String& nameOfTextEditor) const | |||
| if (textBoxes.getUnchecked(i)->getName() == nameOfTextEditor) | |||
| return textBoxes.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const String AlertWindow::getTextEditorContents (const String& nameOfTextEditor) const | |||
| @@ -247,7 +247,7 @@ ComboBox* AlertWindow::getComboBoxComponent (const String& nameOfList) const | |||
| if (comboBoxes.getUnchecked(i)->getName() == nameOfList) | |||
| return comboBoxes.getUnchecked(i); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -657,7 +657,7 @@ private: | |||
| static void* showCallback (void* userData) | |||
| { | |||
| static_cast <AlertWindowInfo*> (userData)->show(); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| }; | |||
| @@ -85,7 +85,7 @@ ComponentPeer* ComponentPeer::getPeerFor (const Component* const component) noex | |||
| return peer; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| bool ComponentPeer::isValidPeer (const ComponentPeer* const peer) noexcept | |||
| @@ -283,7 +283,7 @@ TextInputTarget* ComponentPeer::findCurrentTextInputTarget() | |||
| return ti; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void ComponentPeer::dismissPendingTextInput() | |||
| @@ -431,7 +431,7 @@ namespace ComponentPeerHelpers | |||
| c = c->getParentComponent(); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| } | |||
| @@ -538,7 +538,7 @@ bool ResizableWindow::restoreWindowStateFromString (const String& s) | |||
| const Rectangle<int> screen (Desktop::getInstance().getMonitorAreaContaining (newPos.getCentre())); | |||
| ComponentPeer* const peer = isOnDesktop() ? getPeer() : 0; | |||
| ComponentPeer* const peer = isOnDesktop() ? getPeer() : nullptr; | |||
| if (peer != nullptr) | |||
| peer->getFrameSize().addTo (newPos); | |||
| @@ -1239,7 +1239,7 @@ public: | |||
| const Ptr clipToRectangle (const Rectangle<int>& r) | |||
| { | |||
| edgeTable.clipToRectangle (r); | |||
| return edgeTable.isEmpty() ? 0 : this; | |||
| return edgeTable.isEmpty() ? nullptr : this; | |||
| } | |||
| const Ptr clipToRectangleList (const RectangleList& r) | |||
| @@ -1250,26 +1250,26 @@ public: | |||
| for (RectangleList::Iterator iter (inverse); iter.next();) | |||
| edgeTable.excludeRectangle (*iter.getRectangle()); | |||
| return edgeTable.isEmpty() ? 0 : this; | |||
| return edgeTable.isEmpty() ? nullptr : this; | |||
| } | |||
| const Ptr excludeClipRectangle (const Rectangle<int>& r) | |||
| { | |||
| edgeTable.excludeRectangle (r); | |||
| return edgeTable.isEmpty() ? 0 : this; | |||
| return edgeTable.isEmpty() ? nullptr : this; | |||
| } | |||
| const Ptr clipToPath (const Path& p, const AffineTransform& transform) | |||
| { | |||
| EdgeTable et (edgeTable.getMaximumBounds(), p, transform); | |||
| edgeTable.clipToEdgeTable (et); | |||
| return edgeTable.isEmpty() ? 0 : this; | |||
| return edgeTable.isEmpty() ? nullptr : this; | |||
| } | |||
| const Ptr clipToEdgeTable (const EdgeTable& et) | |||
| { | |||
| edgeTable.clipToEdgeTable (et); | |||
| return edgeTable.isEmpty() ? 0 : this; | |||
| return edgeTable.isEmpty() ? nullptr : this; | |||
| } | |||
| const Ptr clipToImageAlpha (const Image& image, const AffineTransform& transform, const bool betterQuality) | |||
| @@ -1292,12 +1292,12 @@ public: | |||
| else | |||
| straightClipImage (srcData, imageX, imageY, (PixelAlpha*) 0); | |||
| return edgeTable.isEmpty() ? 0 : this; | |||
| return edgeTable.isEmpty() ? nullptr : this; | |||
| } | |||
| } | |||
| if (transform.isSingularity()) | |||
| return 0; | |||
| return nullptr; | |||
| { | |||
| Path p; | |||
| @@ -1314,13 +1314,13 @@ public: | |||
| transformedClipImage (srcData, transform, betterQuality, (PixelAlpha*) 0); | |||
| } | |||
| return edgeTable.isEmpty() ? 0 : this; | |||
| return edgeTable.isEmpty() ? nullptr : this; | |||
| } | |||
| const Ptr translated (const Point<int>& delta) | |||
| { | |||
| edgeTable.translate ((float) delta.getX(), delta.getY()); | |||
| return edgeTable.isEmpty() ? 0 : this; | |||
| return edgeTable.isEmpty() ? nullptr : this; | |||
| } | |||
| bool clipRegionIntersects (const Rectangle<int>& r) const | |||
| @@ -1444,19 +1444,19 @@ public: | |||
| const Ptr clipToRectangle (const Rectangle<int>& r) | |||
| { | |||
| clip.clipTo (r); | |||
| return clip.isEmpty() ? 0 : this; | |||
| return clip.isEmpty() ? nullptr : this; | |||
| } | |||
| const Ptr clipToRectangleList (const RectangleList& r) | |||
| { | |||
| clip.clipTo (r); | |||
| return clip.isEmpty() ? 0 : this; | |||
| return clip.isEmpty() ? nullptr : this; | |||
| } | |||
| const Ptr excludeClipRectangle (const Rectangle<int>& r) | |||
| { | |||
| clip.subtract (r); | |||
| return clip.isEmpty() ? 0 : this; | |||
| return clip.isEmpty() ? nullptr : this; | |||
| } | |||
| const Ptr clipToPath (const Path& p, const AffineTransform& transform) | |||
| @@ -1477,7 +1477,7 @@ public: | |||
| const Ptr translated (const Point<int>& delta) | |||
| { | |||
| clip.offsetAll (delta.getX(), delta.getY()); | |||
| return clip.isEmpty() ? 0 : this; | |||
| return clip.isEmpty() ? nullptr : this; | |||
| } | |||
| bool clipRegionIntersects (const Rectangle<int>& r) const | |||
| @@ -168,7 +168,7 @@ Drawable* Drawable::createFromImageFile (const File& file) | |||
| { | |||
| const ScopedPointer <FileInputStream> fin (file.createInputStream()); | |||
| return fin != nullptr ? createFromImageDataStream (*fin) : 0; | |||
| return fin != nullptr ? createFromImageDataStream (*fin) : nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -49,7 +49,7 @@ public: | |||
| Drawable* parseSVGElement (const XmlElement& xml) | |||
| { | |||
| if (! xml.hasTagName ("svg")) | |||
| return 0; | |||
| return nullptr; | |||
| DrawableComposite* const drawable = new DrawableComposite(); | |||
| @@ -168,7 +168,7 @@ private: | |||
| if (group != nullptr) | |||
| return parseGroupElement (*group); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| DrawableComposite* parseGroupElement (const XmlElement& xml) | |||
| @@ -640,7 +640,7 @@ private: | |||
| const String id (e->getStringAttribute ("xlink:href")); | |||
| if (! id.startsWithChar ('#')) | |||
| return 0; | |||
| return nullptr; | |||
| return findElementForId (topLevelXml, id.substring (1)); | |||
| } | |||
| @@ -847,7 +847,7 @@ private: | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -1288,7 +1288,7 @@ private: | |||
| return found; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| SVGState& operator= (const SVGState&); | |||
| @@ -238,7 +238,7 @@ CustomTypeface::GlyphInfo* CustomTypeface::findGlyph (const juce_wchar character | |||
| if (loadIfNeeded && loadGlyphIfPossible (character)) | |||
| return findGlyph (character, false); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| CustomTypeface::GlyphInfo* CustomTypeface::findGlyphSubstituting (const juce_wchar character) noexcept | |||
| @@ -464,7 +464,7 @@ EdgeTable* CustomTypeface::getEdgeTableForGlyph (int glyphNumber, const AffineTr | |||
| return new EdgeTable (glyph->path.getBoundsTransformed (transform).getSmallestIntegerContainer().expanded (1, 0), | |||
| glyph->path, transform); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| @@ -58,7 +58,7 @@ ImageFileFormat* ImageFileFormat::findImageFormatForStream (InputStream& input) | |||
| return formats[i]; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -680,7 +680,7 @@ FileInputStream* File::createInputStream() const | |||
| if (existsAsFile()) | |||
| return new FileInputStream (*this); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| FileOutputStream* File::createOutputStream (const int bufferSize) const | |||
| @@ -688,7 +688,7 @@ FileOutputStream* File::createOutputStream (const int bufferSize) const | |||
| ScopedPointer <FileOutputStream> out (new FileOutputStream (*this, bufferSize)); | |||
| if (out->failedToOpen()) | |||
| return 0; | |||
| return nullptr; | |||
| return out.release(); | |||
| } | |||
| @@ -209,7 +209,7 @@ int ZipFile::getNumEntries() const noexcept | |||
| const ZipFile::ZipEntry* ZipFile::getEntry (const int index) const noexcept | |||
| { | |||
| ZipEntryInfo* const zei = entries [index]; | |||
| return zei != nullptr ? &(zei->entry) : 0; | |||
| return zei != nullptr ? &(zei->entry) : nullptr; | |||
| } | |||
| int ZipFile::getIndexOfFileName (const String& fileName) const noexcept | |||
| @@ -171,8 +171,8 @@ namespace SocketHelpers | |||
| FD_ZERO (&wset); | |||
| FD_SET (handle, &wset); | |||
| fd_set* const prset = forReading ? &rset : 0; | |||
| fd_set* const pwset = forReading ? 0 : &wset; | |||
| fd_set* const prset = forReading ? &rset : nullptr; | |||
| fd_set* const pwset = forReading ? nullptr : &wset; | |||
| #if JUCE_WINDOWS | |||
| if (select (handle + 1, prset, pwset, 0, timeoutp) < 0) | |||
| @@ -465,7 +465,7 @@ StreamingSocket* StreamingSocket::waitForNextConnection() const | |||
| portNumber, newSocket); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| bool StreamingSocket::isLocal() const noexcept | |||
| @@ -572,7 +572,7 @@ DatagramSocket* DatagramSocket::waitForNextConnection() const | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -46,14 +46,14 @@ public: | |||
| virtual int getInputIndexFor (const Term*) const { return -1; } | |||
| virtual int getOperatorPrecedence() const { return 0; } | |||
| virtual int getNumInputs() const { return 0; } | |||
| virtual Term* getInput (int) const { return 0; } | |||
| virtual Term* getInput (int) const { return nullptr; } | |||
| virtual const ReferenceCountedObjectPtr<Term> negated(); | |||
| virtual const ReferenceCountedObjectPtr<Term> createTermToEvaluateInput (const Scope&, const Term* /*inputTerm*/, | |||
| double /*overallTarget*/, Term* /*topLevelTerm*/) const | |||
| { | |||
| jassertfalse; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| virtual const String getName() const | |||
| @@ -197,7 +197,7 @@ public: | |||
| { | |||
| jassert (input == left || input == right); | |||
| if (input != left && input != right) | |||
| return 0; | |||
| return nullptr; | |||
| const Term* const dest = findDestinationFor (topLevelTerm, this); | |||
| @@ -427,7 +427,7 @@ public: | |||
| Type getType() const noexcept { return operatorType; } | |||
| int getInputIndexFor (const Term* possibleInput) const { return possibleInput == input ? 0 : -1; } | |||
| int getNumInputs() const { return 1; } | |||
| Term* getInput (int index) const { return index == 0 ? input.getObject() : 0; } | |||
| Term* getInput (int index) const { return index == 0 ? input.getObject() : nullptr; } | |||
| Term* clone() const { return new Negate (input->clone()); } | |||
| const TermPtr resolve (const Scope& scope, int recursionDepth) | |||
| @@ -477,7 +477,7 @@ public: | |||
| { | |||
| const TermPtr newDest (createDestinationTerm (scope, input, overallTarget, topLevelTerm)); | |||
| if (newDest == nullptr) | |||
| return 0; | |||
| return nullptr; | |||
| return new Subtract (newDest, (input == left ? right : left)->clone()); | |||
| } | |||
| @@ -502,7 +502,7 @@ public: | |||
| { | |||
| const TermPtr newDest (createDestinationTerm (scope, input, overallTarget, topLevelTerm)); | |||
| if (newDest == nullptr) | |||
| return 0; | |||
| return nullptr; | |||
| if (input == left) | |||
| return new Add (newDest, right->clone()); | |||
| @@ -530,7 +530,7 @@ public: | |||
| { | |||
| const TermPtr newDest (createDestinationTerm (scope, input, overallTarget, topLevelTerm)); | |||
| if (newDest == nullptr) | |||
| return 0; | |||
| return nullptr; | |||
| return new Divide (newDest, (input == left ? right : left)->clone()); | |||
| } | |||
| @@ -555,7 +555,7 @@ public: | |||
| { | |||
| const TermPtr newDest (createDestinationTerm (scope, input, overallTarget, topLevelTerm)); | |||
| if (newDest == nullptr) | |||
| return 0; | |||
| return nullptr; | |||
| if (input == left) | |||
| return new Multiply (newDest, right->clone()); | |||
| @@ -582,7 +582,7 @@ public: | |||
| return t; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| static Constant* findTermToAdjust (Term* const term, const bool mustBeFlagged) | |||
| @@ -594,7 +594,7 @@ public: | |||
| } | |||
| if (dynamic_cast<Function*> (term) != nullptr) | |||
| return 0; | |||
| return nullptr; | |||
| int i; | |||
| const int numIns = term->getNumInputs(); | |||
| @@ -612,7 +612,7 @@ public: | |||
| return c; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| static bool containsAnySymbols (const Term* const t) | |||
| @@ -768,7 +768,7 @@ public: | |||
| if (isDecimalDigit (*t) || (*t == '.' && isDecimalDigit (t[1]))) | |||
| return new Constant (CharacterFunctions::readDoubleValue (text), isResolutionTarget); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const TermPtr readExpression() | |||
| @@ -901,17 +901,17 @@ public: | |||
| } | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const TermPtr readParenthesisedExpression() | |||
| { | |||
| if (! readOperator ("(")) | |||
| return 0; | |||
| return nullptr; | |||
| const TermPtr e (readExpression()); | |||
| if (e == nullptr || ! readOperator (")")) | |||
| return 0; | |||
| return nullptr; | |||
| return e; | |||
| } | |||
| @@ -66,7 +66,7 @@ Component* CameraDevice::createViewerComponent() | |||
| { | |||
| // TODO | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| const String CameraDevice::getFileExtension() | |||
| @@ -115,7 +115,7 @@ CameraDevice* CameraDevice::openDevice (int index, | |||
| { | |||
| // TODO | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| @@ -157,7 +157,7 @@ public: | |||
| const Rectangle<int> bounds (left, top, right - left, bottom - top); | |||
| if (bounds.isEmpty()) | |||
| return 0; | |||
| return nullptr; | |||
| jint* const maskDataElements = env->GetIntArrayElements (maskData, 0); | |||
| @@ -43,7 +43,7 @@ int MidiOutput::getDefaultDeviceIndex() | |||
| MidiOutput* MidiOutput::openDevice (int index) | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| MidiOutput::~MidiOutput() | |||
| @@ -100,7 +100,7 @@ const StringArray MidiInput::getDevices() | |||
| MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| @@ -326,7 +326,7 @@ public: | |||
| if (threads[i] == thisThread) | |||
| return envs[i]; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| enum { maxThreads = 16 }; | |||
| @@ -152,7 +152,7 @@ InputStream* URL::createNativeStream (const String& address, bool isPost, const | |||
| progressCallback, progressCallbackContext, | |||
| headers, timeOutMs, responseHeaders)); | |||
| return wi->stream != 0 ? wi.release() : 0; | |||
| return wi->stream != 0 ? wi.release() : nullptr; | |||
| } | |||
| #endif | |||
| @@ -32,12 +32,12 @@ | |||
| // TODO | |||
| OpenGLContext* OpenGLComponent::createContext() | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void* OpenGLComponent::getNativeWindowHandle() const | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void juce_glViewport (const int w, const int h) | |||
| @@ -433,7 +433,7 @@ public: | |||
| return ap; | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| static ModifierKeys currentModifiers; | |||
| @@ -608,7 +608,7 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType | |||
| android.activity.callVoidMethod (android.showOkCancelBox, javaString (title).get(), javaString (message).get(), | |||
| (jlong) (pointer_sized_int) callback); | |||
| return 0; | |||
| return false; | |||
| } | |||
| int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType iconType, | |||
| @@ -673,8 +673,8 @@ const Image juce_createIconForFile (const File& file) | |||
| } | |||
| //============================================================================== | |||
| void* MouseCursor::createMouseCursorFromImage (const Image&, int, int) { return 0; } | |||
| void* MouseCursor::createStandardMouseCursor (const MouseCursor::StandardCursorType) { return 0; } | |||
| void* MouseCursor::createMouseCursorFromImage (const Image&, int, int) { return nullptr; } | |||
| void* MouseCursor::createStandardMouseCursor (const MouseCursor::StandardCursorType) { return nullptr; } | |||
| void MouseCursor::deleteMouseCursor (void* const /*cursorHandle*/, const bool /*isStandard*/) {} | |||
| //============================================================================== | |||
| @@ -485,13 +485,13 @@ void FileOutputStream::flushInternal() | |||
| //============================================================================== | |||
| const File juce_getExecutableFile() | |||
| { | |||
| #if JUCE_ANDROID | |||
| #if JUCE_ANDROID | |||
| return File (android.appFile); | |||
| #else | |||
| #else | |||
| Dl_info exeInfo; | |||
| dladdr ((void*) juce_getExecutableFile, &exeInfo); // (can't be a const void* on android) | |||
| return File::getCurrentWorkingDirectory().getChildFile (CharPointer_UTF8 (exeInfo.dli_fname)); | |||
| #endif | |||
| #endif | |||
| } | |||
| //============================================================================== | |||
| @@ -515,7 +515,7 @@ int64 File::getVolumeTotalSize() const | |||
| const String File::getVolumeLabel() const | |||
| { | |||
| #if JUCE_MAC | |||
| #if JUCE_MAC | |||
| struct VolAttrBuf | |||
| { | |||
| u_int32_t length; | |||
| @@ -542,7 +542,7 @@ const String File::getVolumeLabel() const | |||
| f = parent; | |||
| } | |||
| #endif | |||
| #endif | |||
| return String::empty; | |||
| } | |||
| @@ -709,7 +709,7 @@ void* threadEntryProc (void* userData) | |||
| #endif | |||
| juce_threadEntryPoint (userData); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void Thread::launchThread() | |||
| @@ -366,7 +366,7 @@ private: | |||
| default: jassertfalse; break; // unsupported format! | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -973,7 +973,7 @@ public: | |||
| inputIds [inputIndex], | |||
| outputIds [outputIndex]); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -42,7 +42,7 @@ const StringArray AudioCDReader::getAvailableCDNames() | |||
| AudioCDReader* AudioCDReader::createReaderForCD (const int index) | |||
| { | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioCDReader::~AudioCDReader() | |||
| @@ -145,7 +145,7 @@ public: | |||
| return faces[i]; | |||
| if (! create) | |||
| return 0; | |||
| return nullptr; | |||
| FreeTypeFontFace* newFace = new FreeTypeFontFace (familyName); | |||
| faces.add (newFace); | |||
| @@ -35,7 +35,7 @@ static void* juce_libjack_handle = nullptr; | |||
| void* juce_load_jack_function (const char* const name) | |||
| { | |||
| if (juce_libjack_handle == 0) | |||
| return 0; | |||
| return nullptr; | |||
| return dlsym (juce_libjack_handle, name); | |||
| } | |||
| @@ -580,7 +580,7 @@ public: | |||
| inputIds [inputIndex], | |||
| outputIds [outputIndex]); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -263,14 +263,14 @@ namespace LinuxErrorHandling | |||
| // A protocol error has occurred | |||
| static int juce_XErrorHandler (Display* display, XErrorEvent* event) | |||
| { | |||
| #if JUCE_DEBUG_XERRORS | |||
| #if JUCE_DEBUG_XERRORS | |||
| char errorStr[64] = { 0 }; | |||
| char requestStr[64] = { 0 }; | |||
| XGetErrorText (display, event->error_code, errorStr, 64); | |||
| XGetErrorDatabaseText (display, "XRequest", String (event->request_code).toUTF8(), "Unknown", requestStr, 64); | |||
| DBG ("ERROR: X returned " + String (errorStr) + " for operation " + String (requestStr)); | |||
| #endif | |||
| #endif | |||
| return 0; | |||
| } | |||
| @@ -433,7 +433,7 @@ private: | |||
| void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* func, void* parameter) | |||
| { | |||
| if (LinuxErrorHandling::errorOccurred) | |||
| return 0; | |||
| return nullptr; | |||
| return AsyncFunctionCaller::call (func, parameter); | |||
| } | |||
| @@ -432,8 +432,8 @@ MidiInput* MidiInput::createNewDevice (const String& deviceName, MidiInputCallba | |||
| const StringArray MidiOutput::getDevices() { return StringArray(); } | |||
| int MidiOutput::getDefaultDeviceIndex() { return 0; } | |||
| MidiOutput* MidiOutput::openDevice (int) { return 0; } | |||
| MidiOutput* MidiOutput::createNewDevice (const String&) { return 0; } | |||
| MidiOutput* MidiOutput::openDevice (int) { return nullptr; } | |||
| MidiOutput* MidiOutput::createNewDevice (const String&) { return nullptr; } | |||
| MidiOutput::~MidiOutput() {} | |||
| void MidiOutput::reset() {} | |||
| bool MidiOutput::getVolume (float&, float&) { return false; } | |||
| @@ -446,8 +446,8 @@ void MidiInput::start() {} | |||
| void MidiInput::stop() {} | |||
| int MidiInput::getDefaultDeviceIndex() { return 0; } | |||
| const StringArray MidiInput::getDevices() { return StringArray(); } | |||
| MidiInput* MidiInput::openDevice (int, MidiInputCallback*) { return 0; } | |||
| MidiInput* MidiInput::createNewDevice (const String&, MidiInputCallback*) { return 0; } | |||
| MidiInput* MidiInput::openDevice (int, MidiInputCallback*) { return nullptr; } | |||
| MidiInput* MidiInput::createNewDevice (const String&, MidiInputCallback*) { return nullptr; } | |||
| #endif | |||
| #endif | |||
| @@ -451,7 +451,7 @@ InputStream* URL::createNativeStream (const String& address, bool isPost, const | |||
| progressCallback, progressCallbackContext, | |||
| headers, timeOutMs, responseHeaders)); | |||
| return wi->isError() ? 0 : wi.release(); | |||
| return wi->isError() ? nullptr : wi.release(); | |||
| } | |||
| @@ -592,7 +592,7 @@ public: | |||
| SharedImage* clone() | |||
| { | |||
| jassertfalse; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void blitToWindow (Window window, int dx, int dy, int dw, int dh, int sx, int sy) | |||
| @@ -2928,7 +2928,7 @@ void* MouseCursor::createMouseCursorFromImage (const Image& image, int hotspotX, | |||
| Window root = RootWindow (display, DefaultScreen (display)); | |||
| unsigned int cursorW, cursorH; | |||
| if (! XQueryBestCursor (display, root, imageW, imageH, &cursorW, &cursorH)) | |||
| return 0; | |||
| return nullptr; | |||
| Image im (Image::ARGB, cursorW, cursorH, true); | |||
| @@ -3268,7 +3268,7 @@ OpenGLContext* OpenGLComponent::createContext() | |||
| ScopedPointer<WindowedGLContext> c (new WindowedGLContext (this, preferredPixelFormat, | |||
| contextToShareListsWith != 0 ? (GLXContext) contextToShareListsWith->getRawContext() : 0)); | |||
| return (c->renderContext != 0) ? c.release() : 0; | |||
| return (c->renderContext != 0) ? c.release() : nullptr; | |||
| } | |||
| void juce_glViewport (const int w, const int h) | |||
| @@ -566,7 +566,7 @@ public: | |||
| : inputDeviceName); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| private: | |||
| @@ -210,7 +210,7 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType | |||
| return mb->getResult() == 1; | |||
| mb.release(); | |||
| return 0; | |||
| return false; | |||
| } | |||
| int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType iconType, | |||
| @@ -36,7 +36,7 @@ namespace CDReaderHelpers | |||
| if (child->getAllSubText().trim() == key) | |||
| return child->getNextElement(); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| static int getIntValueForKey (const XmlElement& xml, const String& key, int defaultValue = -1) | |||
| @@ -83,7 +83,7 @@ namespace CDReaderHelpers | |||
| } | |||
| offsets.add (leadOut * AudioCDReader::samplesPerFrame - 88200); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| static void findDevices (Array<File>& cds) | |||
| @@ -137,7 +137,7 @@ AudioCDReader* AudioCDReader::createReaderForCD (const int index) | |||
| if (cds[index].exists()) | |||
| return new AudioCDReader (cds[index]); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioCDReader::AudioCDReader (const File& volume) | |||
| @@ -423,7 +423,7 @@ CameraDevice* CameraDevice::openDevice (int index, | |||
| if (static_cast <QTCameraDeviceInteral*> (d->internal)->openingError.isEmpty()) | |||
| return d.release(); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| #endif | |||
| @@ -1248,7 +1248,7 @@ public: | |||
| outputIds [outputIndex], | |||
| outputIndex); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -573,9 +573,9 @@ bool MidiOutput::getVolume (float& /*leftVol*/, float& /*rightVol*/) { re | |||
| void MidiOutput::setVolume (float /*leftVol*/, float /*rightVol*/) {} | |||
| void MidiOutput::sendMessageNow (const MidiMessage& message) {} | |||
| const StringArray MidiOutput::getDevices() { return StringArray(); } | |||
| MidiOutput* MidiOutput::openDevice (int index) { return 0; } | |||
| MidiOutput* MidiOutput::openDevice (int index) { return nullptr; } | |||
| const StringArray MidiInput::getDevices() { return StringArray(); } | |||
| MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) { return 0; } | |||
| MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) { return nullptr; } | |||
| #endif | |||
| @@ -296,7 +296,7 @@ public: | |||
| return new EdgeTable (path.getBoundsTransformed (transform).getSmallestIntegerContainer().expanded (1, 0), | |||
| path, transform); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| bool getOutlineForGlyph (int glyphNumber, Path& path) | |||
| @@ -321,7 +321,7 @@ private: | |||
| } | |||
| } | |||
| return 0; | |||
| return nil; | |||
| } | |||
| static void flashMenuBar (NSMenu* menu) | |||
| @@ -550,7 +550,7 @@ void MenuBarModel::setMacMainMenu (MenuBarModel* newMenuBarModel, | |||
| MenuBarModel* MenuBarModel::getMacMainMenu() | |||
| { | |||
| return JuceMainMenuHandler::instance != nullptr | |||
| ? JuceMainMenuHandler::instance->currentModel : 0; | |||
| ? JuceMainMenuHandler::instance->currentModel : nullptr; | |||
| } | |||
| void juce_initialiseMacMainMenu() | |||
| @@ -155,7 +155,7 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType | |||
| return mb->getResult() == 1; | |||
| mb.release(); | |||
| return 0; | |||
| return false; | |||
| } | |||
| int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType iconType, | |||
| @@ -53,7 +53,7 @@ namespace MouseCursorHelpers | |||
| return createFromImage (im, hx * im.getWidth(), hy * im.getHeight()); | |||
| jassertfalse; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| } | |||
| @@ -128,8 +128,8 @@ void MouseCursor::showInWindow (ComponentPeer*) const | |||
| #else | |||
| void* MouseCursor::createMouseCursorFromImage (const Image& image, int hotspotX, int hotspotY) { return 0; } | |||
| void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType type) { return 0; } | |||
| void* MouseCursor::createMouseCursorFromImage (const Image& image, int hotspotX, int hotspotY) { return nullptr; } | |||
| void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType type) { return nullptr; } | |||
| void MouseCursor::deleteMouseCursor (void* const cursorHandle, const bool isStandard) {} | |||
| void MouseCursor::showInAllWindows() const {} | |||
| void MouseCursor::showInWindow (ComponentPeer*) const {} | |||
| @@ -428,7 +428,7 @@ private: | |||
| timeoutInterval: timeOutMs <= 0 ? 60.0 : (timeOutMs / 1000.0)]; | |||
| if (req == nil) | |||
| return 0; | |||
| return nil; | |||
| [req setHTTPMethod: isPost ? @"POST" : @"GET"]; | |||
| //[req setCachePolicy: NSURLRequestReloadIgnoringLocalAndRemoteCacheData]; | |||
| @@ -458,7 +458,7 @@ private: | |||
| return s; | |||
| [s release]; | |||
| return 0; | |||
| return nil; | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebInputStream); | |||
| @@ -472,7 +472,7 @@ InputStream* URL::createNativeStream (const String& address, bool isPost, const | |||
| progressCallback, progressCallbackContext, | |||
| headers, timeOutMs, responseHeaders)); | |||
| return wi->isError() ? 0 : wi.release(); | |||
| return wi->isError() ? nullptr : wi.release(); | |||
| } | |||
| @@ -273,13 +273,13 @@ OpenGLContext* OpenGLComponent::createContext() | |||
| ScopedPointer<WindowedGLContext> c (new WindowedGLContext (*this, preferredPixelFormat, | |||
| contextToShareListsWith != nullptr ? (NSOpenGLContext*) contextToShareListsWith->getRawContext() : 0)); | |||
| return (c->renderContext != nil) ? c.release() : 0; | |||
| return (c->renderContext != nil) ? c.release() : nullptr; | |||
| } | |||
| void* OpenGLComponent::getNativeWindowHandle() const | |||
| { | |||
| return context != nullptr ? static_cast<WindowedGLContext*> (static_cast<OpenGLContext*> (context))->getNativeWindowHandle() | |||
| : 0; | |||
| : nullptr; | |||
| } | |||
| void juce_glViewport (const int w, const int h) | |||
| @@ -533,7 +533,7 @@ OpenGLContext* OpenGLComponent::createContext() | |||
| dynamic_cast <const GLESContext*> (contextToShareListsWith), | |||
| type == openGLES2 ? kEAGLRenderingAPIOpenGLES2 : kEAGLRenderingAPIOpenGLES1); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void OpenGLPixelFormat::getAvailablePixelFormats (Component* /*component*/, | |||
| @@ -1269,7 +1269,7 @@ private: | |||
| if (currentASIODev[0] != nullptr) | |||
| currentASIODev[0]->callback (index); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| static ASIOTime* JUCE_ASIOCALLBACK bufferSwitchTimeInfoCallback1 (ASIOTime*, long index, long) | |||
| @@ -1277,7 +1277,7 @@ private: | |||
| if (currentASIODev[1] != nullptr) | |||
| currentASIODev[1]->callback (index); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| static ASIOTime* JUCE_ASIOCALLBACK bufferSwitchTimeInfoCallback2 (ASIOTime*, long index, long) | |||
| @@ -1285,7 +1285,7 @@ private: | |||
| if (currentASIODev[2] != nullptr) | |||
| currentASIODev[2]->callback (index); | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| static void JUCE_ASIOCALLBACK bufferSwitchCallback0 (long index, long) | |||
| @@ -1682,11 +1682,11 @@ public: | |||
| if (deviceNames[i].containsIgnoreCase ("asio4all")) | |||
| return i; // asio4all is a safe choice for a default.. | |||
| #if JUCE_DEBUG | |||
| #if JUCE_DEBUG | |||
| if (deviceNames.size() > 1 && deviceNames[0].containsIgnoreCase ("digidesign")) | |||
| return 1; // (the digi m-box driver crashes the app when you run | |||
| // it in the debugger, which can be a bit annoying) | |||
| #endif | |||
| #endif | |||
| return 0; | |||
| } | |||
| @@ -1729,7 +1729,7 @@ public: | |||
| return new ASIOAudioIODevice (outputDeviceName, *(classIds [index]), freeSlot, String::empty); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| //============================================================================== | |||
| @@ -1836,7 +1836,7 @@ AudioIODevice* juce_createASIOAudioIODeviceForGUID (const String& name, | |||
| const int freeSlot = ASIOAudioIODeviceType::findFreeSlot(); | |||
| if (freeSlot < 0) | |||
| return 0; | |||
| return nullptr; | |||
| return new ASIOAudioIODevice (name, *(CLSID*) guid, freeSlot, optionalDllForDirectLoading); | |||
| } | |||
| @@ -394,7 +394,7 @@ void* ActiveXControlComponent::queryInterface (const void* iid) const | |||
| && SUCCEEDED (control->control->QueryInterface (*(const IID*) iid, &result))) | |||
| return result; | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| void ActiveXControlComponent::setControlBounds (const Rectangle<int>& newBounds) const | |||
| @@ -1002,7 +1002,7 @@ AudioCDReader* AudioCDReader::createReaderForCD (const int deviceIndex) | |||
| return new AudioCDReader (new CDDeviceWrapper (list [deviceIndex], h)); | |||
| } | |||
| return 0; | |||
| return nullptr; | |||
| } | |||
| AudioCDReader::AudioCDReader (void* handle_) | |||
| @@ -1052,7 +1052,7 @@ bool AudioCDReader::readSamples (int** destSamples, int numDestChannels, int sta | |||
| const int toDo = (int) jmin ((int64) numSamples, bufferEndSample - startSampleInFile); | |||
| int* const l = destSamples[0] + startOffsetInDestBuffer; | |||
| int* const r = numDestChannels > 1 ? (destSamples[1] + startOffsetInDestBuffer) : 0; | |||
| int* const r = numDestChannels > 1 ? (destSamples[1] + startOffsetInDestBuffer) : nullptr; | |||
| const short* src = (const short*) buffer.getData(); | |||
| src += 2 * (startSampleInFile - bufferStartSample); | |||
| @@ -1108,7 +1108,7 @@ bool AudioCDReader::readSamples (int** destSamples, int numDestChannels, int sta | |||
| else | |||
| { | |||
| int* l = destSamples[0] + startOffsetInDestBuffer; | |||
| int* r = numDestChannels > 1 ? (destSamples[1] + startOffsetInDestBuffer) : 0; | |||
| int* r = numDestChannels > 1 ? (destSamples[1] + startOffsetInDestBuffer) : nullptr; | |||
| while (--numSamples >= 0) | |||
| { | |||