From c6bb01b631bdfc9ae27b7ed7cf87b22941a94a07 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 11 Apr 2015 08:45:45 -0400 Subject: [PATCH] Use "#ifdef DEBUG" for complex asserts. This avoids writing a lot of (void)s. --- source/grid/grid_reordering.cc | 5 +++++ source/opencascade/boundary_lib.cc | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/source/grid/grid_reordering.cc b/source/grid/grid_reordering.cc index a440c6dd4c..f13019301e 100644 --- a/source/grid/grid_reordering.cc +++ b/source/grid/grid_reordering.cc @@ -974,6 +974,7 @@ namespace internal Mesh::sanity_check_node (const Cell &c, const unsigned int local_node_num) const { +#ifdef DEBUG // check that every edge // coming into a node has the // same node value @@ -1009,6 +1010,10 @@ namespace internal edge_list[ge2].nodes[or2 == forward_edge ? 0 : 1]), ExcMessage ("This message does not satisfy the internal " "consistency check")); +#else + (void)c; + (void)local_node_num; +#endif } diff --git a/source/opencascade/boundary_lib.cc b/source/opencascade/boundary_lib.cc index 810ce32c53..aeebc80e8d 100644 --- a/source/opencascade/boundary_lib.cc +++ b/source/opencascade/boundary_lib.cc @@ -235,11 +235,15 @@ namespace OpenCASCADE Point<1> ArclengthProjectionLineManifold::pull_back(const Point &space_point) const { + double t (0.0); +#ifdef DEBUG ShapeAnalysis_Curve curve_analysis; gp_Pnt proj; - double t; - double dist = curve_analysis.Project(curve->GetCurve(), point(space_point), tolerance, proj, t, true); - Assert(dist < tolerance*length, ExcPointNotOnManifold(space_point)); + Assert(curve_analysis.Project(curve->GetCurve(), point(space_point), tolerance, proj, t, true) + < tolerance*length, ExcPointNotOnManifold(space_point)); +#else + (void)space_point; +#endif return Point<1>(GCPnts_AbscissaPoint::Length(curve->GetCurve(),curve->GetCurve().FirstParameter(),t)); } -- 2.39.5