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

Side by Side Diff: webrtc/modules/audio_processing/vad/vad_circular_buffer.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 void VadCircularBuffer::Reset() { 28 void VadCircularBuffer::Reset() {
29 is_full_ = false; 29 is_full_ = false;
30 index_ = 0; 30 index_ = 0;
31 sum_ = 0; 31 sum_ = 0;
32 } 32 }
33 33
34 VadCircularBuffer* VadCircularBuffer::Create(int buffer_size) { 34 VadCircularBuffer* VadCircularBuffer::Create(int buffer_size) {
35 if (buffer_size <= 0) 35 if (buffer_size <= 0)
36 return NULL; 36 return nullptr;
37 return new VadCircularBuffer(buffer_size); 37 return new VadCircularBuffer(buffer_size);
38 } 38 }
39 39
40 double VadCircularBuffer::Oldest() const { 40 double VadCircularBuffer::Oldest() const {
41 if (!is_full_) 41 if (!is_full_)
42 return buffer_[0]; 42 return buffer_[0];
43 else 43 else
44 return buffer_[index_]; 44 return buffer_[index_];
45 } 45 }
46 46
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 128 }
129 for (; index > index_1; index--) { 129 for (; index > index_1; index--) {
130 if (Set(index, 0.0) < 0) 130 if (Set(index, 0.0) < 0)
131 return -1; 131 return -1;
132 } 132 }
133 } 133 }
134 return 0; 134 return 0;
135 } 135 }
136 136
137 } // namespace webrtc 137 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698