Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Unified Diff: webrtc/modules/audio_coding/test/utility.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/test/utility.cc
diff --git a/webrtc/modules/audio_coding/test/utility.cc b/webrtc/modules/audio_coding/test/utility.cc
index 5c1fc3f968dc7e81af8fab9c954609a3794f533f..8caf927b68b7e21a7a6699402833bf180a6b0613 100644
--- a/webrtc/modules/audio_coding/test/utility.cc
+++ b/webrtc/modules/audio_coding/test/utility.cc
@@ -111,7 +111,7 @@ int16_t ChooseCodec(CodecInst& codecInst) {
char myStr[15] = "";
do {
printf("\nChoose a codec [0]: ");
- EXPECT_TRUE(fgets(myStr, 10, stdin) != NULL);
+ EXPECT_TRUE(fgets(myStr, 10, stdin) != nullptr);
codecID = atoi(myStr);
if ((codecID < 0) || (codecID >= noCodec)) {
printf("\nOut of range.\n");
@@ -137,7 +137,7 @@ void PrintCodecs() {
}
CircularBuffer::CircularBuffer(uint32_t len)
- : _buff(NULL),
+ : _buff(nullptr),
_idx(0),
_buffIsFull(false),
_calcAvg(false),
@@ -145,7 +145,7 @@ CircularBuffer::CircularBuffer(uint32_t len)
_sum(0),
_sumSqr(0) {
_buff = new double[len];
- if (_buff == NULL) {
+ if (_buff == nullptr) {
_buffLen = 0;
} else {
for (uint32_t n = 0; n < len; n++) {
@@ -156,9 +156,9 @@ CircularBuffer::CircularBuffer(uint32_t len)
}
CircularBuffer::~CircularBuffer() {
- if (_buff != NULL) {
+ if (_buff != nullptr) {
delete[] _buff;
- _buff = NULL;
+ _buff = nullptr;
}
}

Powered by Google App Engine
This is Rietveld 408576698