cosmetic changes

This commit is contained in:
Laurent Rineau 2018-04-17 16:42:25 +02:00
parent 00ebc78c1d
commit 095c27e2be
21 changed files with 82 additions and 83 deletions

View File

@ -916,7 +916,7 @@ protected:
typedef typename Allocator_traits::template rebind_alloc<Outer_ccb> Outer_ccb_allocator;
typedef typename Allocator_traits::template rebind_alloc<Inner_ccb> Inner_ccb_allocator;
typedef typename Allocator_traits::template rebind_alloc<Isolated_vertex> Iso_vert_allocator;
#else
#else // not CGAL_CXX11
// Vertex allocator.
typedef typename Allocator::template rebind<Vertex> Vertex_alloc_rebind;
typedef typename Vertex_alloc_rebind::other Vertex_allocator;
@ -941,7 +941,7 @@ protected:
typedef typename Allocator::template rebind<Isolated_vertex>
Iso_vert_alloc_rebind;
typedef typename Iso_vert_alloc_rebind::other Iso_vert_allocator;
#endif
#endif // not CGAL_CXX11
public:
typedef typename Halfedge_list::size_type Size;

View File

@ -1557,7 +1557,7 @@ protected:
{
Point_2* p_pt = m_points_alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Points_alloc>::construct(m_points_alloc, p_pt, pt);
std::allocator_traits<Points_alloc>::construct(m_points_alloc, p_pt, pt);
#else
m_points_alloc.construct(p_pt, pt);
#endif

View File

@ -67,10 +67,9 @@ namespace CGAL {
#ifdef CGAL_CXX11
typedef std::allocator_traits<Alloc_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator;
#else
#else // not CGAL_CXX11
typedef typename Alloc_::template rebind<Dart>::other Dart_allocator;
#endif
#endif // not CGAL_CXX11
typedef Compact_container<Dart, Dart_allocator> Dart_container;
typedef typename Dart_container::iterator Dart_handle;

View File

@ -121,7 +121,7 @@ public:
typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator;
typedef typename Allocator_traits::template rebind_alloc<Halfedge> Halfedge_allocator;
typedef typename Allocator_traits::template rebind_alloc<Face> Face_allocator;
#else
#else // CGAL_CXX11
typedef typename Allocator::template rebind< Vertex> Vertex_alloc_rebind;
typedef typename Vertex_alloc_rebind::other Vertex_allocator;
typedef typename Allocator::template rebind< Halfedge>
@ -129,7 +129,7 @@ public:
typedef typename Halfedge_alloc_rebind::other Halfedge_allocator;
typedef typename Allocator::template rebind< Face> Face_alloc_rebind;
typedef typename Face_alloc_rebind::other Face_allocator;
#endif
#endif // not CGAL_CXX11
typedef In_place_list<Vertex,false,Vertex_allocator> Vertex_list;
typedef typename Vertex_list::iterator Vertex_handle;
@ -264,15 +264,15 @@ protected:
Edge_allocator edge_allocator; // allocates pairs of halfedges
Face_allocator face_allocator;
template <typename A, typename T>
void destroy(A& a, const T& t)
{
template <typename A, typename T>
void destroy(A& a, const T& t)
{
#ifdef CGAL_CXX11
std::allocator_traits<A>::destroy(a,t);
std::allocator_traits<A>::destroy(a,t);
#else
a.destroy(t);
a.destroy(t);
#endif
}
}
Vertex* get_vertex_node( const Vertex& t) {
Vertex* p = vertex_allocator.allocate(1);

View File

@ -71,7 +71,7 @@ public:
typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator;
typedef typename Allocator_traits::template rebind_alloc<Halfedge> Halfedge_allocator;
typedef typename Allocator_traits::template rebind_alloc<Face> Face_allocator;
#else
#else // not CGAL_CXX11
typedef typename Allocator::template rebind< Vertex> Vertex_alloc_rebind;
typedef typename Vertex_alloc_rebind::other Vertex_allocator;
typedef typename Allocator::template rebind< Halfedge>
@ -79,7 +79,7 @@ public:
typedef typename Halfedge_alloc_rebind::other Halfedge_allocator;
typedef typename Allocator::template rebind< Face> Face_alloc_rebind;
typedef typename Face_alloc_rebind::other Face_allocator;
#endif
#endif // not CGAL_CXX11
#ifdef CGAL__HALFEDGEDS_USE_INTERNAL_VECTOR
typedef internal::vector<Vertex, Vertex_allocator> Vertex_vector;

View File

@ -65,13 +65,13 @@ class chained_map
std::size_t old_index;
#ifdef CGAL_CXX11
typedef std::allocator_traits<Allocator> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<chained_map_elem<T> > allocator_type;
typedef std::allocator_traits<Allocator> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<chained_map_elem<T> > allocator_type;
#else
typedef typename Allocator::template rebind<chained_map_elem<T> >::other allocator_type;
#endif
allocator_type alloc;
allocator_type alloc;
public:
T& xdef() { return STOP.i; }
@ -89,15 +89,15 @@ private:
inline void insert(std::size_t x, T y);
void destroy(chained_map_elem<T>* item)
{
void destroy(chained_map_elem<T>* item)
{
#ifdef CGAL_CXX11
typedef std::allocator_traits<allocator_type> Allocator_type_traits;
Allocator_type_traits::destroy(alloc,item);
typedef std::allocator_traits<allocator_type> Allocator_type_traits;
Allocator_type_traits::destroy(alloc,item);
#else
alloc.destroy(item);
alloc.destroy(item);
#endif
}
}
public:
typedef chained_map_elem<T>* chained_map_item;

View File

@ -93,7 +93,7 @@ namespace CGAL {
#ifdef CGAL_CXX11
template <typename T>
struct Container_for_attributes :
public Compact_container<T, typename std::allocator_traits<Alloc_>::template rebind_alloc<T> >
public Compact_container<T, typename std::allocator_traits<Alloc_>::template rebind_alloc<T> >
{};
#else
template <typename T>

View File

@ -59,7 +59,7 @@ class Handle_for
typedef typename Alloc_traits::template rebind_traits<RefCounted>::pointer pointer;
#else
typedef typename Alloc_::template rebind<RefCounted>::other Allocator;
typedef typename Allocator::pointer pointer;
typedef typename Allocator::pointer pointer;
#endif
static Allocator allocator;

View File

@ -295,12 +295,12 @@ protected:
}
void put_node( pointer p) {
#ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY
#ifdef CGAL_CXX11
# ifdef CGAL_CXX11
std::allocator_traits<Allocator>::destroy(allocator, p);
#else
# else
allocator.destroy( p);
#endif
#else
# endif
#else // not CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY
p->~value_type();
#endif
allocator.deallocate( p, 1);

View File

@ -142,9 +142,9 @@ void No_intersection_surface_sweep_2<Vis>::deallocate_event(Event* event)
// Perfrom the actual deallocation.
#ifdef CGAL_CXX11
std::allocator_traits<Event_alloc>::destroy(m_eventAlloc, event);
std::allocator_traits<Event_alloc>::destroy(m_eventAlloc, event);
#else
m_eventAlloc.destroy(event);
m_eventAlloc.destroy(event);
#endif
m_eventAlloc.deallocate(event, 1);
}
@ -271,7 +271,7 @@ _init_curve(const X_monotone_curve_2& curve, unsigned int index)
{
// Construct and initialize a subcurve object.
#ifdef CGAL_CXX11
std::allocator_traits<Subcurve_alloc>::construct(m_subCurveAlloc, m_subCurves + index, m_masterSubcurve );
std::allocator_traits<Subcurve_alloc>::construct(m_subCurveAlloc, m_subCurves + index, m_masterSubcurve );
#else
m_subCurveAlloc.construct(m_subCurves + index, m_masterSubcurve);
#endif
@ -615,9 +615,9 @@ No_intersection_surface_sweep_2<Vis>::_allocate_event(const Point_2& pt,
// Allocate the event.
Event* e = m_eventAlloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Event_alloc>::construct(m_eventAlloc, e, m_masterEvent);
std::allocator_traits<Event_alloc>::construct(m_eventAlloc, e, m_masterEvent);
#else
m_eventAlloc.construct(e, m_masterEvent);
m_eventAlloc.construct(e, m_masterEvent);
#endif
e->init(pt, type, ps_x, ps_y);
@ -639,9 +639,9 @@ _allocate_event_at_open_boundary(Attribute type,
{
Event* e = m_eventAlloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<Event_alloc>::construct(m_eventAlloc, e, m_masterEvent);
std::allocator_traits<Event_alloc>::construct(m_eventAlloc, e, m_masterEvent);
#else
m_eventAlloc.construct(e, m_masterEvent);
m_eventAlloc.construct(e, m_masterEvent);
#endif
e->init_at_open_boundary(type, ps_x, ps_y);