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

Side by Side Diff: webrtc/api/statstypes.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 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2014 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); }); 772 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); });
773 if (it != end()) { 773 if (it != end()) {
774 StatsReport* report = new StatsReport((*it)->id()); 774 StatsReport* report = new StatsReport((*it)->id());
775 delete *it; 775 delete *it;
776 *it = report; 776 *it = report;
777 return report; 777 return report;
778 } 778 }
779 return InsertNew(id); 779 return InsertNew(id);
780 } 780 }
781 781
782 // Looks for a report with the given |id|. If one is not found, NULL 782 // Looks for a report with the given |id|. If one is not found, null
783 // will be returned. 783 // will be returned.
784 StatsReport* StatsCollection::Find(const StatsReport::Id& id) { 784 StatsReport* StatsCollection::Find(const StatsReport::Id& id) {
785 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 785 RTC_DCHECK(thread_checker_.CalledOnValidThread());
786 Container::iterator it = std::find_if(list_.begin(), list_.end(), 786 Container::iterator it = std::find_if(list_.begin(), list_.end(),
787 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); }); 787 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); });
788 return it == list_.end() ? nullptr : *it; 788 return it == list_.end() ? nullptr : *it;
789 } 789 }
790 790
791 } // namespace webrtc 791 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/audio/audio_receive_stream.cc » ('j') | webrtc/audio/audio_receive_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698