Revert "Bugfix in copy functor": this 'fix' is a bug.

This reverts commit adfa032311.
This commit is contained in:
Guillaume Damiand 2018-09-13 14:35:03 +02:00
parent 94559ab4c1
commit a13db5f171
1 changed files with 19 additions and 2 deletions

View File

@ -167,7 +167,8 @@ struct Get_convert_attribute_functor<Map1,Map2,i,Converters,false>
}
};
// ****************************************************************************
// Call a given functor if both i-attribute have an non void info
// Call a given functor if both i-attribute have an non void info, or both
// have no info.
template< typename Map1, typename Map2, unsigned int i,
typename Converters,
bool Withinfo1=CGAL::template
@ -202,6 +203,21 @@ struct Call_functor_if_both_attributes_have_info<Map1, Map2, i,
run(cmap1, cmap2, dh1, dh2, converters);
}
};
template< typename Map1, typename Map2, unsigned int i, typename Converters >
struct Call_functor_if_both_attributes_have_info<Map1, Map2, i,
Converters, false, false>
{
static typename Map2::template Attribute_handle<i>::type
run( const Map1& /*cmap1*/,
Map2& cmap2,
typename Map1::Dart_const_handle /*dh1*/,
typename Map2::Dart_handle /*dh2*/,
const Converters& /*converters*/ )
{
return cmap2.template create_attribute<i>();
}
};
// ****************************************************************************
// Call a given functor only if both 0-attribute have a point.
// general case i!=0 or one attribute without point.
@ -258,7 +274,8 @@ struct Copy_attribute_functor_if_nonvoid
// If dh2 has already an i-attribute, it was already copied.
if ( cmap2.template attribute<i>(dh2)!=Map2::null_handle ) return;
// Otherwise we copy the info if both attribute have non void info.
// Otherwise we copy the attribute if both attributes have non void info,
// or if they both have no info.
typename Map2::template Attribute_handle<i>::type
res=Call_functor_if_both_attributes_have_info
<Map1, Map2, i, Converters>::