mirror of https://github.com/CGAL/cgal
Fix CORE header-only
This commit is contained in:
parent
dd8d66ef96
commit
68df272c01
|
|
@ -62,7 +62,7 @@ namespace CORE {
|
|||
const double relEps = (1.0 + std::ldexp(1.0, -52));
|
||||
|
||||
/// CORE_DIAGFILE is used for all warning and error messages
|
||||
extern const char* CORE_DIAGFILE;
|
||||
const char* const CORE_DIAGFILE = "Core_Diagnostics"; // global file name
|
||||
|
||||
/// template function returns the maximum value of two
|
||||
template <class T>
|
||||
|
|
|
|||
|
|
@ -194,9 +194,6 @@ int IntExponent(double d) {
|
|||
return e-53;
|
||||
}
|
||||
|
||||
/// CORE_DIAGFILE is file name for core_error(..) output.
|
||||
const char* CORE_DIAGFILE = "Core_Diagnostics"; // global file name
|
||||
|
||||
/// core_error is the method to write Core Library warning or error messages
|
||||
/** Both warnings and errors are written to a file called CORE_DIAGFILE.
|
||||
* But errors are also written on std:cerr (similar to std::perror()).
|
||||
|
|
|
|||
|
|
@ -40,6 +40,12 @@
|
|||
#define CORE_INLINE
|
||||
#endif
|
||||
|
||||
#ifdef CGAL_HEADER_ONLY
|
||||
#define CGAL_INLINE_FUNCTION inline
|
||||
#else
|
||||
#define CGAL_INLINE_FUNCTION
|
||||
#endif
|
||||
|
||||
// Macros for memory pool
|
||||
#ifdef CORE_DISABLE_MEMORY_POOL
|
||||
#define CORE_NEW(T)
|
||||
|
|
@ -51,9 +57,9 @@
|
|||
#define CORE_DELETE(T) void operator delete( void *p, size_t );
|
||||
|
||||
#define CORE_MEMORY_IMPL(T) \
|
||||
void *T::operator new( size_t size) \
|
||||
CGAL_INLINE_FUNCTION void *T::operator new( size_t size) \
|
||||
{ return MemoryPool<T>::global_allocator().allocate(size); } \
|
||||
void T::operator delete( void *p, size_t ) \
|
||||
CGAL_INLINE_FUNCTION void T::operator delete( void *p, size_t ) \
|
||||
{ MemoryPool<T>::global_allocator().free(p); }
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue