table is empty.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145318
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-03-30 Ian Lance Taylor <iant@google.com>
+
+ * include/backward/hashtable.h (clear): Return quickly if the
+ table is empty.
+
2009-03-27 Ian Lance Taylor <iant@google.com>
* include/backward/hashtable.h (_S_num_primes): Change to 29.
2009-03-27 Ian Lance Taylor <iant@google.com>
* include/backward/hashtable.h (_S_num_primes): Change to 29.
hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
clear()
{
hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
clear()
{
+ if (_M_num_elements == 0)
+ return;
+
for (size_type __i = 0; __i < _M_buckets.size(); ++__i)
{
_Node* __cur = _M_buckets[__i];
for (size_type __i = 0; __i < _M_buckets.size(); ++__i)
{
_Node* __cur = _M_buckets[__i];