Fix CORE header-only

This commit is contained in:
Laurent Rineau 2016-03-09 18:51:34 +01:00
parent dd8d66ef96
commit 68df272c01
3 changed files with 9 additions and 6 deletions

View File

@ -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>

View File

@ -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()).

View File

@ -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