|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2007-12-08 10:44:07
Author: danieljames
Date: 2007-12-08 10:44:06 EST (Sat, 08 Dec 2007)
New Revision: 41886
URL: http://svn.boost.org/trac/boost/changeset/41886
Log:
Remove some of the alternative implementations. This makes things a bit less efficient, but it's probably okay in most cases.
Text files modified:
sandbox-branches/unordered-refactor/boost/unordered/detail/hash_table_impl.hpp | 29 +++++++++++------------------
1 files changed, 11 insertions(+), 18 deletions(-)
Modified: sandbox-branches/unordered-refactor/boost/unordered/detail/hash_table_impl.hpp
==============================================================================
--- sandbox-branches/unordered-refactor/boost/unordered/detail/hash_table_impl.hpp (original)
+++ sandbox-branches/unordered-refactor/boost/unordered/detail/hash_table_impl.hpp 2007-12-08 10:44:06 EST (Sat, 08 Dec 2007)
@@ -587,6 +587,11 @@
if(base < cached_begin_bucket_) cached_begin_bucket_ = base;
}
#else
+ void link_node(link_ptr, local_iterator_base)
+ {
+ BOOST_ASSERT(false);
+ }
+
void link_node(link_ptr n, bucket_ptr base)
{
n->next_ = base->next_;
@@ -757,9 +762,10 @@
return iterator_base(base, n);
}
-#if BOOST_UNORDERED_HASH_EQUIVALENT
iterator_base create_node(value_type const& v, iterator_base position)
{
+ BOOST_ASSERT(!BOOST_UNORDERED_HASH_EQUIVALENT);
+
// throws, strong exception-safety:
link_ptr n = construct_node(v);
@@ -771,6 +777,8 @@
iterator_base create_node(value_type const& v,
bucket_ptr base, local_iterator_base position)
{
+ BOOST_ASSERT(!BOOST_UNORDERED_HASH_EQUIVALENT);
+
// throws, strong exception-safety:
link_ptr n = construct_node(v);
@@ -782,9 +790,7 @@
return iterator_base(base, n);
}
-#endif
-#if BOOST_UNORDERED_HASH_EQUIVALENT
void copy_group(local_iterator_base it, bucket_ptr dst)
{
local_iterator_base end = it;
@@ -793,12 +799,6 @@
for(it.increment(); it != end; it.increment())
create_node(*it, pos);
}
-#else
- void copy_group(local_iterator_base it, bucket_ptr dst)
- {
- create_node(*it, dst);
- }
-#endif
// Delete Node
//
@@ -825,17 +825,10 @@
}
}
-#if BOOST_UNORDERED_HASH_EQUIVALENT
void delete_group(link_ptr first_node)
{
- delete_nodes(first_node, prev_in_group(first_node)->next_);
+ delete_nodes(first_node, next_group(first_node));
}
-#else
- void delete_group(link_ptr node)
- {
- allocators_.destroy(node);
- }
-#endif
// Clear
//
@@ -981,4 +974,4 @@
}
}
-#undef HASH_TABLE_DATA
\ No newline at end of file
+#undef HASH_TABLE_DATA
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk