summaryrefslogtreecommitdiff
path: root/chromium/base/memory/scoped_vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/memory/scoped_vector.h')
-rw-r--r--chromium/base/memory/scoped_vector.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/base/memory/scoped_vector.h b/chromium/base/memory/scoped_vector.h
index 59144c0e82a..1b30f635ca1 100644
--- a/chromium/base/memory/scoped_vector.h
+++ b/chromium/base/memory/scoped_vector.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/logging.h"
#include "base/move.h"
#include "base/stl_util.h"
@@ -64,6 +65,12 @@ class ScopedVector {
void push_back(T* elem) { v_.push_back(elem); }
+ void pop_back() {
+ DCHECK(!empty());
+ delete v_.back();
+ v_.pop_back();
+ }
+
std::vector<T*>& get() { return v_; }
const std::vector<T*>& get() const { return v_; }
void swap(std::vector<T*>& other) { v_.swap(other); }