From ce7d06d5f45ad084cf260f9bdf481f673fbf348e Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Sat, 5 Dec 2020 08:12:56 +0000 Subject: [PATCH] Disable NEF trace unless the user specifically wants it --- Nef_2/include/CGAL/Nef_2/debug.h | 17 +++++++------- Nef_3/include/CGAL/Nef_3/K3_tree.h | 23 +++++++++---------- .../CGAL/Nef_3/SNC_external_structure.h | 2 +- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/debug.h b/Nef_2/include/CGAL/Nef_2/debug.h index a8581420761..d4ccc190ddc 100644 --- a/Nef_2/include/CGAL/Nef_2/debug.h +++ b/Nef_2/include/CGAL/Nef_2/debug.h @@ -16,15 +16,14 @@ #include #ifdef NDEBUG -#undef CGAL_NEF_DEBUG -#define CGAL_NEF_DEBUG 1 +#undef CGAL_USE_TRACE #endif #ifndef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 1 #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE static int debugthread=1; #endif @@ -35,40 +34,40 @@ #undef CGAL_NEF_CTRACEN #undef CGAL_NEF_SETDTHREAD -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_SETDTHREAD(l) debugthread=l #else #define CGAL_NEF_SETDTHREAD(l) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_TRACE(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ { std::cerr<<" "<(0)) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_TRACEV(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ { std::cerr<<" "<<#t<<" = "<<(t)<(0)) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_TRACEN(t) if((debugthread%CGAL_NEF_DEBUG)==0) \ { std::cerr<< " "<(0)) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_CTRACE(b,t) if(b) {std::cerr<<" "<(0)) #endif -#ifndef NDEBUG +#ifdef CGAL_USE_TRACE #define CGAL_NEF_CTRACEN(b,t) if(b){ std::cerr<<" "<(0)) diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index 6c4a3fa6f42..c3b8aaecffc 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -524,19 +524,18 @@ else { Segment_3 s = S.front().second; S.pop_front(); if( n->is_leaf()) { -#ifndef NDEBUG + CGAL_assertion_code( - if( first_segment) { - first_segment = false; - CGAL_NEF_TRACEN("operator++: prev_segment=(none), segment="<