stylistic

This commit is contained in:
joaquintides 2018-12-31 10:13:37 +01:00
parent 008b1a5ed6
commit adbd496248
3 changed files with 22 additions and 22 deletions

View File

@ -115,7 +115,7 @@ struct allocator_traits
#endif
template<typename T>
static void destroy(Allocator&,T* p){p->~T();}
static void destroy(Allocator&,T* p){p->~T();}
#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
#pragma warning(pop)

View File

@ -103,7 +103,7 @@ protected:
{
x=final().allocate_node();
BOOST_TRY{
final().construct_node(x,v);
final().construct_value(x,v);
}
BOOST_CATCH(...){
final().deallocate_node(x);
@ -117,7 +117,7 @@ protected:
{
x=final().allocate_node();
BOOST_TRY{
final().construct_node(x,boost::move(const_cast<value_type&>(v)));
final().construct_value(x,boost::move(const_cast<value_type&>(v)));
}
BOOST_CATCH(...){
final().deallocate_node(x);
@ -152,12 +152,12 @@ protected:
void erase_(node_type* x)
{
final().destroy_node(static_cast<final_node_type*>(x));
final().destroy_value(static_cast<final_node_type*>(x));
}
void delete_node_(node_type* x)
{
final().destroy_node(static_cast<final_node_type*>(x));
final().destroy_value(static_cast<final_node_type*>(x));
}
void clear_(){}

View File

@ -546,22 +546,22 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
bfm_allocator::member,static_cast<node_pointer>(x),1);
}
void construct_node(node_type* x,const Value& v)
void construct_value(node_type* x,const Value& v)
{
node_alloc_traits::construct(
bfm_allocator::member,boost::addressof(x->value()),v);
}
void construct_node(node_type* x,BOOST_RV_REF(Value) v)
void construct_value(node_type* x,BOOST_RV_REF(Value) v)
{
node_alloc_traits::construct(
bfm_allocator::member,boost::addressof(x->value()),boost::move(v));
}
BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
void,construct_node,vartempl_construct_node_impl,node_type*,x)
void,construct_value,vartempl_construct_value_impl,node_type*,x)
void destroy_node(node_type* x)
void destroy_value(node_type* x)
{
node_alloc_traits::destroy(
bfm_allocator::member,boost::addressof(x->value()));
@ -611,7 +611,7 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
{
node_type* x=allocate_node();
BOOST_TRY{
construct_node(x,t);
construct_value(x,t);
BOOST_TRY{
node_type* res=super::insert_(x->value(),x,detail::emplaced_tag());
if(res==x){
@ -619,13 +619,13 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
return std::pair<node_type*,bool>(res,true);
}
else{
destroy_node(x);
destroy_value(x);
deallocate_node(x);
return std::pair<node_type*,bool>(res,false);
}
}
BOOST_CATCH(...){
destroy_node(x);
destroy_value(x);
BOOST_RETHROW;
}
BOOST_CATCH_END
@ -653,7 +653,7 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
{
node_type* x=allocate_node();
BOOST_TRY{
construct_node(x,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
construct_value(x,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
BOOST_TRY{
node_type* res=super::insert_(x->value(),x,detail::emplaced_tag());
if(res==x){
@ -661,13 +661,13 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
return std::pair<node_type*,bool>(res,true);
}
else{
destroy_node(x);
destroy_value(x);
deallocate_node(x);
return std::pair<node_type*,bool>(res,false);
}
}
BOOST_CATCH(...){
destroy_node(x);
destroy_value(x);
BOOST_RETHROW;
}
BOOST_CATCH_END
@ -710,7 +710,7 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
{
node_type* x=allocate_node();
BOOST_TRY{
construct_node(x,t);
construct_value(x,t);
BOOST_TRY{
node_type* res=super::insert_(
x->value(),position,x,detail::emplaced_tag());
@ -719,13 +719,13 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
return std::pair<node_type*,bool>(res,true);
}
else{
destroy_node(x);
destroy_value(x);
deallocate_node(x);
return std::pair<node_type*,bool>(res,false);
}
}
BOOST_CATCH(...){
destroy_node(x);
destroy_value(x);
BOOST_RETHROW;
}
BOOST_CATCH_END
@ -756,7 +756,7 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
{
node_type* x=allocate_node();
BOOST_TRY{
construct_node(x,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
construct_value(x,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
BOOST_TRY{
node_type* res=super::insert_(
x->value(),position,x,detail::emplaced_tag());
@ -765,13 +765,13 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
return std::pair<node_type*,bool>(res,true);
}
else{
destroy_node(x);
destroy_value(x);
deallocate_node(x);
return std::pair<node_type*,bool>(res,false);
}
}
BOOST_CATCH(...){
destroy_node(x);
destroy_value(x);
BOOST_RETHROW;
}
BOOST_CATCH_END
@ -998,7 +998,7 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
private:
template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
void vartempl_construct_node_impl(
void vartempl_construct_value_impl(
node_type* x,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
{
node_alloc_traits::construct(