1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-24 01:54:22 +00:00

More 'nullptr' updates and minor clean-ups.

This commit is contained in:
Julian Storer 2011-04-07 22:20:25 +01:00
parent 46c3a6bbe5
commit b047d9be53
113 changed files with 560 additions and 663 deletions

View file

@ -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;
}
//==============================================================================

View file

@ -42,7 +42,7 @@ const StringArray AudioCDReader::getAvailableCDNames()
AudioCDReader* AudioCDReader::createReaderForCD (const int index)
{
return 0;
return nullptr;
}
AudioCDReader::~AudioCDReader()

View file

@ -145,7 +145,7 @@ public:
return faces[i];
if (! create)
return 0;
return nullptr;
FreeTypeFontFace* newFace = new FreeTypeFontFace (familyName);
faces.add (newFace);

View file

@ -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;
}
//==============================================================================

View file

@ -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);
}

View file

@ -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

View file

@ -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();
}

View file

@ -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)