This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
patch for hashtable
- To: STDC++ <libstdc++ at sources dot redhat dot com>
- Subject: patch for hashtable
- From: Levente Farkas <lfarkas at mindmaker dot hu>
- Date: Sun, 24 Sep 2000 16:38:40 +0200
- Organization: Mindmaker Ltd.
- Reply-To: lfarkas at mindmaker dot hu
hi,
to avoid the following warning:
---------------------------
/usr/include/g++-v3/ext/stl_hashtable.h: In method `void std::hashtable<_Val, _K
ey, _HashFcn,
_ExtractKey, _EqualKey, _Alloc>::_M_copy_from (const std::hashtable<_Val, _Key,
_HashFcn, _ExtractKey,
_EqualKey, _Alloc> &)':
/usr/include/g++-v3/ext/stl_hashtable.h:1032: warning: declaration of `__copy' s
hadows global
declaration
---------------------------
applay the attached patch.
yours.
-- Levente
"The only thing worse than not knowing the truth is
ruining the bliss of ignorance."
--- libstdc++-v3/ext/stl_hashtable.h.lfarkas Sun Sep 24 16:35:06 2000
+++ libstdc++-v3/ext/stl_hashtable.h Sun Sep 24 16:36:18 2000
@@ -1029,14 +1029,14 @@
for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
const _Node* __cur = __ht._M_buckets[__i];
if (__cur) {
- _Node* __copy = _M_new_node(__cur->_M_val);
- _M_buckets[__i] = __copy;
+ _Node* __local_copy = _M_new_node(__cur->_M_val);
+ _M_buckets[__i] = __local_copy;
for (_Node* __next = __cur->_M_next;
__next;
__cur = __next, __next = __cur->_M_next) {
- __copy->_M_next = _M_new_node(__next->_M_val);
- __copy = __copy->_M_next;
+ __local_copy->_M_next = _M_new_node(__next->_M_val);
+ __local_copy = __local_copy->_M_next;
}
}
}