mirror of https://github.com/CGAL/cgal
Disable a warning. Fix an allocator call
This commit is contained in:
parent
99bc374cce
commit
b33ab791e1
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
#include <CGAL/CORE/extLong.h>
|
||||
#include <CGAL/atomic.h>
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#ifdef CGAL_HEADER_ONLY
|
||||
|
||||
|
|
@ -340,4 +341,6 @@ inline void setPositionalFormat(std::ostream& o = std::cout) {
|
|||
#include <CGAL/CORE/CoreDefs_impl.h>
|
||||
#endif // CGAL_HEADER_ONLY
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // _CORE_COREDEFS_H_
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
# pragma warning(disable: 4714) // function marked as __forceinline not inlined
|
||||
# pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning)
|
||||
# pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used
|
||||
# pragma warning(disable: 4834) // discarding return value of function with 'nodiscard' attribute
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
#ifndef CGAL_ROTATION_TREE_H
|
||||
#define CGAL_ROTATION_TREE_H
|
||||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <CGAL/license/Partition_2.h>
|
||||
|
||||
|
||||
|
|
@ -178,6 +180,8 @@ private:
|
|||
|
||||
#include <CGAL/Partition_2/Rotation_tree_2_impl.h>
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
#endif // CGAL_ROTATION_TREE_H
|
||||
|
||||
// For the Emacs editor:
|
||||
|
|
|
|||
|
|
@ -107,7 +107,8 @@ protected:
|
|||
typedef Segment_tree_node<C_Data,C_Window,C_Interface> Segment_tree_node_t;
|
||||
typedef Segment_tree_node<C_Data,C_Window,C_Interface> *link_type;
|
||||
|
||||
std::allocator<Segment_tree_node_t> alloc;
|
||||
typedef std::allocator<Segment_tree_node_t> allocator_type;
|
||||
allocator_type alloc;
|
||||
|
||||
C_Interface m_interface;
|
||||
bool is_built;
|
||||
|
|
@ -197,7 +198,11 @@ protected:
|
|||
{
|
||||
Segment_tree_node_t node(l,r,kl,kr);
|
||||
Segment_tree_node_t* node_ptr = alloc.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<allocator_type>::construct(alloc, node_ptr, node);
|
||||
#else
|
||||
alloc.construct(node_ptr, node);
|
||||
#endif
|
||||
return node_ptr;
|
||||
}
|
||||
|
||||
|
|
@ -205,7 +210,11 @@ protected:
|
|||
{
|
||||
Segment_tree_node_t node(kl,kr);
|
||||
Segment_tree_node_t* node_ptr = alloc.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<allocator_type>::construct(alloc, node_ptr, node);
|
||||
#else
|
||||
alloc.construct(node_ptr, node);
|
||||
#endif
|
||||
return node_ptr;
|
||||
}
|
||||
|
||||
|
|
@ -213,7 +222,11 @@ protected:
|
|||
{
|
||||
Segment_tree_node_t node;
|
||||
Segment_tree_node_t* node_ptr = alloc.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<allocator_type>::construct(alloc, node_ptr, node);
|
||||
#else
|
||||
alloc.construct(node_ptr, node);
|
||||
#endif
|
||||
return node_ptr;
|
||||
}
|
||||
|
||||
|
|
@ -298,7 +311,11 @@ protected:
|
|||
|
||||
void delete_node(Segment_tree_node_t* node_ptr)
|
||||
{
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<allocator_type>::destroy(alloc, node_ptr);
|
||||
#else
|
||||
alloc.destroy(node_ptr);
|
||||
#endif
|
||||
alloc.deallocate(node_ptr,1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue