forked from devernay/xcodelegacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhashtable.patch
More file actions
32 lines (30 loc) · 1.25 KB
/
hashtable.patch
File metadata and controls
32 lines (30 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- hashtable.orig 2015-09-01 14:43:32.000000000 +0200
+++ hashtable 2010-09-03 22:41:42.000000000 +0200
@@ -860,7 +860,7 @@
typedef typename Internal::IF<unique_keys, std::pair<iterator, bool>, iterator>::type
Insert_Return_Type;
- node* find_node (node* p, const key_type& k, typename hashtable::hash_code_t c);
+ node* find_node (node* p, const key_type& k, typename hashtable::hash_code_t c) const;
std::pair<iterator, bool> insert (const value_type&, std::tr1::true_type);
iterator insert (const value_type&, std::tr1::false_type);
@@ -1042,8 +1042,9 @@
node* n = ht.m_buckets[i];
node** tail = m_buckets + i;
while (n) {
- *tail = m_allocate_node (n);
- (*tail).copy_code_from (n);
+ // *tail = m_allocate_node (n);
+ // (*tail).copy_code_from (n);
+ *tail = m_allocate_node (n->m_v);
tail = &((*tail)->m_next);
n = n->m_next;
}
@@ -1216,7 +1217,7 @@
bool c, bool m, bool u>
typename hashtable<K,V,A,Ex,Eq,H1,H2,H,RP,c,m,u>::node*
hashtable<K,V,A,Ex,Eq,H1,H2,H,RP,c,m,u>
-::find_node (node* p, const key_type& k, typename hashtable::hash_code_t code)
+::find_node (node* p, const key_type& k, typename hashtable::hash_code_t code) const
{
for ( ; p ; p = p->m_next)
if (this->compare (k, code, p))