From: David Wells Date: Sat, 11 Apr 2015 12:45:45 +0000 (-0400) Subject: Use "#ifdef DEBUG" for complex asserts. X-Git-Tag: v8.3.0-rc1~278^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6bb01b631bdfc9ae27b7ed7cf87b22941a94a07;p=dealii.git Use "#ifdef DEBUG" for complex asserts. This avoids writing a lot of (void)s. --- 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)); }