[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, map_extractor*);
inline node_ptr add_node(node_constructor& a, bucket_ptr bucket)
{
node_ptr n = a.release();
this->link_node_in_bucket(n, bucket);
return n;
}
inline node_ptr add_node(node_constructor& a, bucket_ptr bucket)
{
node_ptr n = a.release();
this->link_node_in_bucket(n, bucket);
return n;
}
#if defined(BOOST_UNORDERED_STD_FORWARD)
// 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, map_extractor*);
inline node_ptr add_node(node_constructor& a, bucket_ptr bucket, node_ptr pos)
{
node_ptr n = a.release();
if(BOOST_UNORDERED_BORLAND_BOOL(pos))
this->link_node(n, pos);
else
this->link_node_in_bucket(n, bucket);
return n;
}
inline node_ptr add_node(node_constructor& a, bucket_ptr bucket, node_ptr pos)
{
node_ptr n = a.release();
if(BOOST_UNORDERED_BORLAND_BOOL(pos))
this->link_node(n, pos);
else
this->link_node_in_bucket(n, bucket);
return n;
}
public:
@ -585,7 +585,7 @@ namespace boost { namespace unordered_detail {
{
key_type const& k = extractor::extract(a.get()->value());
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)
{
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));
node_alloc().destroy(n);
node_alloc().deallocate(n, 1);