diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-12-09 20:58:11 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-12-09 20:58:11 -0500 |
commit | 2fc70e11172ea6ae3747f35ed5a6e01723956bf1 (patch) | |
tree | 0cfc1206ef6fbe3bc7014f72690d6d9f21c0f5d2 /sc/inc/rangelst.hxx | |
parent | a4c8eab127f5c8fa8bb85c536060d264f7ce69be (diff) |
Don't allow client code to call clear() directly, it leaks memory.
Call RemoveAll() instead. Better yet, I've removed clear() call
as it's safer this way.
Diffstat (limited to 'sc/inc/rangelst.hxx')
-rw-r--r-- | sc/inc/rangelst.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 550ff53a9d7f..8b306c6f4b8a 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -77,6 +77,7 @@ public: size_t GetCellCount() const; ScRange* Remove(size_t nPos); + void RemoveAll(); bool empty() const; size_t size() const; @@ -89,7 +90,6 @@ public: ScRange* back(); const ScRange* back() const; void push_back(ScRange* p); - void clear(); private: ::std::vector<ScRange*> maRanges; |