summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx/include/tinystl/unordered_set.h
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-04-08 15:13:38 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-04-08 15:13:38 +0200
commitd4a431f0ea75957702de88dd1b074bd9a22ef6d2 (patch)
tree7af8ada5b3b1b9b34eae232f03a6d9044da1ed2a /3rdparty/bx/include/tinystl/unordered_set.h
parent5a33ceba7536d45a84b0f0238c21e391f6e6abbc (diff)
latest BGFX (nw)
Diffstat (limited to '3rdparty/bx/include/tinystl/unordered_set.h')
-rw-r--r--3rdparty/bx/include/tinystl/unordered_set.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/3rdparty/bx/include/tinystl/unordered_set.h b/3rdparty/bx/include/tinystl/unordered_set.h
index a4caddd2529..976a412b124 100644
--- a/3rdparty/bx/include/tinystl/unordered_set.h
+++ b/3rdparty/bx/include/tinystl/unordered_set.h
@@ -81,12 +81,12 @@ namespace tinystl {
{
const size_t nbuckets = (size_t)(other.m_buckets.last - other.m_buckets.first);
buffer_init<pointer, Alloc>(&m_buckets);
- buffer_resize<pointer, Alloc>(&m_buckets, 9, 0);
+ buffer_resize<pointer, Alloc>(&m_buckets, nbuckets, 0);
- for (pointer* it = *other.m_buckets.first; it; it = it->next) {
+ for (pointer it = *other.m_buckets.first; it; it = it->next) {
unordered_hash_node<Key, void>* newnode = new(placeholder(), Alloc::static_allocate(sizeof(unordered_hash_node<Key, void>))) unordered_hash_node<Key, void>(*it);
newnode->next = newnode->prev = 0;
- unordered_hash_node_insert(newnode, hash(*it), m_buckets.first, nbuckets - 1);
+ unordered_hash_node_insert(newnode, hash(it->first), m_buckets.first, nbuckets - 1);
}
}