Permalink
Browse files

Massive C++11 update. Changed all instances of NULL to nullptr, and u…

…pdated copyright for 2012.
  • Loading branch information...
1 parent ff2f4aa commit 7190a1506fe1241233305e1ebd79f7f4afa26928 @sbooth committed Feb 24, 2012
Showing with 1,078 additions and 1,078 deletions.
  1. +2 −2 AllocateABL.cpp
  2. +1 −1 AllocateABL.h
  3. +2 −2 ChannelLayoutsAreEqual.cpp
  4. +1 −1 ChannelLayoutsAreEqual.h
  5. +1 −1 Converter/AudioConverter.cpp
  6. +1 −1 Converter/AudioConverter.h
  7. +3 −3 Converter/DeinterleavingFloatConverter.cpp
  8. +1 −1 Converter/DeinterleavingFloatConverter.h
  9. +2 −2 Converter/PCMConverter.cpp
  10. +1 −1 Converter/PCMConverter.h
  11. +5 −5 CreateChannelLayout.cpp
  12. +1 −1 CreateChannelLayout.h
  13. +5 −5 CreateDisplayNameForURL.cpp
  14. +1 −1 CreateDisplayNameForURL.h
  15. +2 −2 CreateStringForOSType.cpp
  16. +1 −1 CreateStringForOSType.h
  17. +5 −5 DeallocateABL.cpp
  18. +1 −1 DeallocateABL.h
  19. +199 −199 Decoders/AudioDecoder.cpp
  20. +19 −19 Decoders/AudioDecoder.h
  21. +51 −51 Decoders/CoreAudioDecoder.cpp
  22. +3 −3 Decoders/CoreAudioDecoder.h
  23. +47 −47 Decoders/FLACDecoder.cpp
  24. +3 −3 Decoders/FLACDecoder.h
  25. +27 −27 Decoders/LibsndfileDecoder.cpp
  26. +3 −3 Decoders/LibsndfileDecoder.h
  27. +11 −11 Decoders/LoopableRegionDecoder.cpp
  28. +2 −2 Decoders/LoopableRegionDecoder.h
  29. +34 −34 Decoders/MODDecoder.cpp
  30. +3 −3 Decoders/MODDecoder.h
  31. +44 −44 Decoders/MPEGDecoder.cpp
  32. +3 −3 Decoders/MPEGDecoder.h
  33. +15 −15 Decoders/MonkeysAudioDecoder.cpp
  34. +3 −3 Decoders/MonkeysAudioDecoder.h
  35. +21 −21 Decoders/MusepackDecoder.cpp
  36. +3 −3 Decoders/MusepackDecoder.h
  37. +53 −53 Decoders/OggSpeexDecoder.cpp
  38. +3 −3 Decoders/OggSpeexDecoder.h
  39. +17 −17 Decoders/OggVorbisDecoder.cpp
  40. +3 −3 Decoders/OggVorbisDecoder.h
  41. +24 −24 Decoders/WavPackDecoder.cpp
  42. +3 −3 Decoders/WavPackDecoder.h
  43. +2 −2 Guard.cpp
  44. +1 −1 Guard.h
  45. +11 −11 Input/FileInputSource.cpp
  46. +3 −3 Input/FileInputSource.h
  47. +24 −24 Input/HTTPInputSource.cpp
  48. +3 −3 Input/HTTPInputSource.h
  49. +14 −14 Input/InMemoryFileInputSource.cpp
  50. +4 −4 Input/InMemoryFileInputSource.h
  51. +14 −14 Input/InputSource.cpp
  52. +5 −5 Input/InputSource.h
  53. +13 −13 Input/MemoryMappedFileInputSource.cpp
  54. +4 −4 Input/MemoryMappedFileInputSource.h
  55. +14 −14 Logger.cpp
  56. +10 −10 Logger.h
  57. +2 −2 Mutex.cpp
  58. +1 −1 Mutex.h
  59. +163 −163 Player/AudioPlayer.cpp
  60. +2 −2 Player/AudioPlayer.h
  61. +145 −145 Player/BasicAudioPlayer.cpp
  62. +2 −2 Player/BasicAudioPlayer.h
  63. +8 −8 Player/DecoderStateData.cpp
  64. +1 −1 Player/DecoderStateData.h
  65. +1 −1 Semaphore.cpp
  66. +1 −1 Semaphore.h
View
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@ AllocateABL(const AudioStreamBasicDescription& format, UInt32 capacityFrames)
AudioBufferList *
AllocateABL(UInt32 channelsPerFrame, UInt32 bytesPerFrame, bool interleaved, UInt32 capacityFrames)
{
- AudioBufferList *bufferList = NULL;
+ AudioBufferList *bufferList = nullptr;
UInt32 numBuffers = interleaved ? 1 : channelsPerFrame;
UInt32 channelsPerBuffer = interleaved ? channelsPerFrame : 1;
View
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@ ChannelLayoutsAreEqual(const AudioChannelLayout *lhs, const AudioChannelLayout *
if(lhs == rhs)
return true;
- if((NULL == lhs && NULL != rhs) || (NULL != lhs && NULL == rhs))
+ if((nullptr == lhs && nullptr != rhs) || (nullptr != lhs && nullptr == rhs))
return false;
// First check if the tags are equal
View
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -70,8 +70,8 @@ DeinterleavingFloatConverter::~DeinterleavingFloatConverter()
UInt32
DeinterleavingFloatConverter::Convert(const AudioBufferList *inputBuffer, AudioBufferList *outputBuffer, UInt32 frameCount)
{
- assert(NULL != inputBuffer);
- assert(NULL != outputBuffer);
+ assert(nullptr != inputBuffer);
+ assert(nullptr != outputBuffer);
// Nothing to do
if(0 == frameCount) {
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -74,7 +74,7 @@ PCMConverter::~PCMConverter()
UInt32 PCMConverter::Convert(const AudioBufferList *inputBuffer, AudioBufferList *outputBuffer, UInt32 frameCount)
{
- if(NULL == inputBuffer || NULL == outputBuffer)
+ if(nullptr == inputBuffer || nullptr == outputBuffer)
return 0;
// Nothing to do
View
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
View
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@ static size_t GetChannelLayoutSize(UInt32 numberChannelDescriptions)
size_t GetChannelLayoutSize(const AudioChannelLayout *layout)
{
- assert(NULL != layout);
+ assert(nullptr != layout);
return GetChannelLayoutSize(layout->mNumberChannelDescriptions);
}
@@ -70,8 +70,8 @@ AudioChannelLayout * CreateChannelLayoutWithBitmap(UInt32 channelBitmap)
AudioChannelLayout * CopyChannelLayout(const AudioChannelLayout *rhs)
{
- if(NULL == rhs)
- return NULL;
+ if(nullptr == rhs)
+ return nullptr;
size_t layoutSize = GetChannelLayoutSize(rhs->mNumberChannelDescriptions);
AudioChannelLayout *channelLayout = static_cast<AudioChannelLayout *>(malloc(layoutSize));
@@ -84,7 +84,7 @@ AudioChannelLayout * CreateDefaultAudioChannelLayout(UInt32 channelsPerFrame)
{
assert(0 < channelsPerFrame);
- AudioChannelLayout *channelLayout = NULL;
+ AudioChannelLayout *channelLayout = nullptr;
switch(channelsPerFrame) {
case 1: channelLayout = CreateChannelLayoutWithTag(kAudioChannelLayoutTag_Mono); break;
View
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,15 +39,15 @@
CFStringRef
CreateDisplayNameForURL(CFURLRef url)
{
- assert(NULL != url);
+ assert(nullptr != url);
- CFStringRef displayName = NULL;
+ CFStringRef displayName = nullptr;
#if !TARGET_OS_IPHONE
CFStringRef scheme = CFURLCopyScheme(url);
if(scheme) {
bool isFileURL = (kCFCompareEqualTo == CFStringCompare(CFSTR("file"), scheme, kCFCompareCaseInsensitive));
- CFRelease(scheme), scheme = NULL;
+ CFRelease(scheme), scheme = nullptr;
if(isFileURL) {
OSStatus result = LSCopyDisplayNameForURL(url, &displayName);
@@ -62,7 +62,7 @@ CreateDisplayNameForURL(CFURLRef url)
CFRetain(displayName);
}
}
- // If scheme is NULL the URL is probably invalid, but can still be logged
+ // If scheme is nullptr the URL is probably invalid, but can still be logged
else {
displayName = CFURLGetString(url);
CFRetain(displayName);
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,5 +35,5 @@ CFStringRef CreateStringForOSType(OSType osType)
unsigned char formatID [4];
*(UInt32 *)formatID = OSSwapHostToBigInt32(osType);
- return CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%.4s"), formatID);
+ return CFStringCreateWithFormat(kCFAllocatorDefault, nullptr, CFSTR("%.4s"), formatID);
}
View
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
View
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,12 +36,12 @@
AudioBufferList *
DeallocateABL(AudioBufferList *bufferList)
{
- assert(NULL != bufferList);
+ assert(nullptr != bufferList);
for(UInt32 bufferIndex = 0; bufferIndex < bufferList->mNumberBuffers; ++bufferIndex)
- free(bufferList->mBuffers[bufferIndex].mData), bufferList->mBuffers[bufferIndex].mData = NULL;
+ free(bufferList->mBuffers[bufferIndex].mData), bufferList->mBuffers[bufferIndex].mData = nullptr;
- free(bufferList), bufferList = NULL;
+ free(bufferList), bufferList = nullptr;
- return NULL;
+ return nullptr;
}
View
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Stephen F. Booth <me@sbooth.org>
+ * Copyright (C) 2010, 2011, 2012 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
Oops, something went wrong.

0 comments on commit 7190a15

Please sign in to comment.