From c89f04a7c5256d92b75e9868df9af6cfb7050559 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 3 Mar 2014 06:25:15 +0100 Subject: clang-modernize -loop-convert and some manual adjustments --- Source/Core/AudioCommon/OpenALStream.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/Core/AudioCommon/OpenALStream.cpp') diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp index b12ee66922..99aebc6d05 100644 --- a/Source/Core/AudioCommon/OpenALStream.cpp +++ b/Source/Core/AudioCommon/OpenALStream.cpp @@ -17,10 +17,10 @@ bool OpenALStream::Start() { bool bReturn = false; - ALDeviceList *pDeviceList = new ALDeviceList(); - if ((pDeviceList) && (pDeviceList->GetNumDevices())) + ALDeviceList pDeviceList; + if (pDeviceList.GetNumDevices()) { - char *defDevName = pDeviceList->GetDeviceName(pDeviceList->GetDefaultDevice()); + char *defDevName = pDeviceList.GetDeviceName(pDeviceList.GetDefaultDevice()); WARN_LOG(AUDIO, "Found OpenAL device %s", defDevName); @@ -49,7 +49,6 @@ bool OpenALStream::Start() { PanicAlertT("OpenAL: can't open device %s", defDevName); } - delete pDeviceList; } else { -- cgit v1.2.3 From d802d392811be44d34ae9cd23f616db93e54c50f Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 9 Mar 2014 21:14:26 +0100 Subject: clang-modernize -use-nullptr and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine --- Source/Core/AudioCommon/OpenALStream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/AudioCommon/OpenALStream.cpp') diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp index 99aebc6d05..38e57beca2 100644 --- a/Source/Core/AudioCommon/OpenALStream.cpp +++ b/Source/Core/AudioCommon/OpenALStream.cpp @@ -27,7 +27,7 @@ bool OpenALStream::Start() ALCdevice *pDevice = alcOpenDevice(defDevName); if (pDevice) { - ALCcontext *pContext = alcCreateContext(pDevice, NULL); + ALCcontext *pContext = alcCreateContext(pDevice, nullptr); if (pContext) { // Used to determine an appropriate period size (2x period = total buffer size) @@ -83,7 +83,7 @@ void OpenALStream::Stop() ALCcontext *pContext = alcGetCurrentContext(); ALCdevice *pDevice = alcGetContextsDevice(pContext); - alcMakeContextCurrent(NULL); + alcMakeContextCurrent(nullptr); alcDestroyContext(pContext); alcCloseDevice(pDevice); } -- cgit v1.2.3