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

Side by Side Diff: webrtc/system_wrappers/interface/scoped_vector.h

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const_iterator end() const { return v_.end(); } 77 const_iterator end() const { return v_.end(); }
78 78
79 const_reference front() const { return v_.front(); } 79 const_reference front() const { return v_.front(); }
80 reference front() { return v_.front(); } 80 reference front() { return v_.front(); }
81 const_reference back() const { return v_.back(); } 81 const_reference back() const { return v_.back(); }
82 reference back() { return v_.back(); } 82 reference back() { return v_.back(); }
83 83
84 void push_back(T* elem) { v_.push_back(elem); } 84 void push_back(T* elem) { v_.push_back(elem); }
85 85
86 void pop_back() { 86 void pop_back() {
87 DCHECK(!empty()); 87 RTC_DCHECK(!empty());
88 delete v_.back(); 88 delete v_.back();
89 v_.pop_back(); 89 v_.pop_back();
90 } 90 }
91 91
92 std::vector<T*>& get() { return v_; } 92 std::vector<T*>& get() { return v_; }
93 const std::vector<T*>& get() const { return v_; } 93 const std::vector<T*>& get() const { return v_; }
94 void swap(std::vector<T*>& other) { v_.swap(other); } 94 void swap(std::vector<T*>& other) { v_.swap(other); }
95 void swap(ScopedVector<T>& other) { v_.swap(other.v_); } 95 void swap(ScopedVector<T>& other) { v_.swap(other.v_); }
96 void release(std::vector<T*>* out) { 96 void release(std::vector<T*>* out) {
97 out->swap(v_); 97 out->swap(v_);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return v_.erase(first, last); 148 return v_.erase(first, last);
149 } 149 }
150 150
151 private: 151 private:
152 std::vector<T*> v_; 152 std::vector<T*> v_;
153 }; 153 };
154 154
155 } // namespace webrtc 155 } // namespace webrtc
156 156
157 #endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_SCOPED_VECTOR_H_ 157 #endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_SCOPED_VECTOR_H_
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/interface/aligned_array.h ('k') | webrtc/system_wrappers/source/critical_section_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698