[SVN r55901]
This commit is contained in:
Daniel James
2009-08-31 10:39:25 +00:00
parent 386d9f28d7
commit c40cb50fe5
2 changed files with 18 additions and 18 deletions

View File

@ -67,13 +67,13 @@ namespace boost { namespace unordered_detail {
static bool group_equals(node_ptr it1, node_ptr it2, set_extractor*); static bool group_equals(node_ptr it1, node_ptr it2, set_extractor*);
static bool group_equals(node_ptr it1, node_ptr it2, map_extractor*); static bool group_equals(node_ptr it1, node_ptr it2, map_extractor*);
inline node_ptr add_node(node_constructor& a, bucket_ptr bucket) inline node_ptr add_node(node_constructor& a, bucket_ptr bucket)
{ {
node_ptr n = a.release(); node_ptr n = a.release();
this->link_node_in_bucket(n, bucket); this->link_node_in_bucket(n, bucket);
return n; return n;
} }
#if defined(BOOST_UNORDERED_STD_FORWARD) #if defined(BOOST_UNORDERED_STD_FORWARD)
// Emplace (unique keys) // Emplace (unique keys)
@ -325,15 +325,15 @@ namespace boost { namespace unordered_detail {
static bool group_equals(node_ptr it1, node_ptr it2, set_extractor*); static bool group_equals(node_ptr it1, node_ptr it2, set_extractor*);
static bool group_equals(node_ptr it1, node_ptr it2, map_extractor*); static bool group_equals(node_ptr it1, node_ptr it2, map_extractor*);
inline node_ptr add_node(node_constructor& a, bucket_ptr bucket, node_ptr pos) inline node_ptr add_node(node_constructor& a, bucket_ptr bucket, node_ptr pos)
{ {
node_ptr n = a.release(); node_ptr n = a.release();
if(BOOST_UNORDERED_BORLAND_BOOL(pos)) if(BOOST_UNORDERED_BORLAND_BOOL(pos))
this->link_node(n, pos); this->link_node(n, pos);
else else
this->link_node_in_bucket(n, bucket); this->link_node_in_bucket(n, bucket);
return n; return n;
} }
public: public:
@ -585,7 +585,7 @@ namespace boost { namespace unordered_detail {
{ {
key_type const& k = extractor::extract(a.get()->value()); key_type const& k = extractor::extract(a.get()->value());
bucket_ptr bucket = this->get_bucket(this->bucket_index(k)); bucket_ptr bucket = this->get_bucket(this->bucket_index(k));
add_node(a, bucket, find_iterator(bucket, k)); add_node(a, bucket, find_iterator(bucket, k));
} }
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////

View File

@ -120,7 +120,7 @@ namespace boost { namespace unordered_detail {
void hash_table_manager<A, G>::destruct_node(node_ptr b) void hash_table_manager<A, G>::destruct_node(node_ptr b)
{ {
node* raw_ptr = static_cast<node*>(&*b); node* raw_ptr = static_cast<node*>(&*b);
BOOST_UNORDERED_DESTRUCT(&raw_ptr->value(), value_type); BOOST_UNORDERED_DESTRUCT(&raw_ptr->value(), value_type);
real_node_ptr n(node_alloc().address(*raw_ptr)); real_node_ptr n(node_alloc().address(*raw_ptr));
node_alloc().destroy(n); node_alloc().destroy(n);
node_alloc().deallocate(n, 1); node_alloc().deallocate(n, 1);