diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 20:11:38 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 20:11:38 +0000 |
commit | e05c8e8d00cf12f9fcfdd08374b36ac425af0892 (patch) | |
tree | 0cc664d39b3907b7f65f27b2857e2313883d9718 /base | |
parent | 24247e47575023a8d95a499205389f43243dbbdf (diff) | |
download | chromium_src-e05c8e8d00cf12f9fcfdd08374b36ac425af0892.zip chromium_src-e05c8e8d00cf12f9fcfdd08374b36ac425af0892.tar.gz chromium_src-e05c8e8d00cf12f9fcfdd08374b36ac425af0892.tar.bz2 |
Mac: Fix leak in tabpose.
BUG=51786
TEST=valgrind stays green
Review URL: http://codereview.chromium.org/3183019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/scoped_vector.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/scoped_vector.h b/base/scoped_vector.h index 8e4dd7c..b797078 100644 --- a/base/scoped_vector.h +++ b/base/scoped_vector.h @@ -27,7 +27,7 @@ class ScopedVector { std::vector<T*>* operator->() { return &v; } const std::vector<T*>* operator->() const { return &v; } - T* operator[](size_t i) { return v[i]; } + T*& operator[](size_t i) { return v[i]; } const T* operator[](size_t i) const { return v[i]; } bool empty() const { return v.empty(); } @@ -54,6 +54,7 @@ class ScopedVector { } void reset() { STLDeleteElements(&v); } + void resize(size_t new_size) { v.resize(new_size); } private: std::vector<T*> v; |