From cfcb826e6c048abf7795255f14d90ee06c83fbfc Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Thu, 25 Jun 2015 14:58:44 +0200
Subject: [PATCH] [T] Move NDEBUG to include function.

This avoids a warning about unused argument oct_tree.
---
 Tests/GeoLib/TestOctTree.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Tests/GeoLib/TestOctTree.cpp b/Tests/GeoLib/TestOctTree.cpp
index 7b9958b6004..6a68a1099dd 100644
--- a/Tests/GeoLib/TestOctTree.cpp
+++ b/Tests/GeoLib/TestOctTree.cpp
@@ -29,12 +29,12 @@ public:
 			delete p;
 		}
 	}
+#ifndef NDEBUG
 	template <std::size_t MAX_POINTS>
 	void
 	checkOctTreeChildsNonNullptr(
 		GeoLib::OctTree<GeoLib::Point, MAX_POINTS> const& oct_tree) const
 	{
-#ifndef NDEBUG
 		ASSERT_NE(nullptr, oct_tree.getChild(0));
 		ASSERT_NE(nullptr, oct_tree.getChild(1));
 		ASSERT_NE(nullptr, oct_tree.getChild(2));
@@ -43,14 +43,14 @@ public:
 		ASSERT_NE(nullptr, oct_tree.getChild(5));
 		ASSERT_NE(nullptr, oct_tree.getChild(6));
 		ASSERT_NE(nullptr, oct_tree.getChild(7));
-#endif
 	}
+#endif
 
+#ifndef NDEBUG
 	template <std::size_t MAX_POINTS>
 	void
 	checkOctTreeChildsNullptr(GeoLib::OctTree<GeoLib::Point, MAX_POINTS> const& oct_tree) const
 	{
-#ifndef NDEBUG
 		ASSERT_EQ(nullptr, oct_tree.getChild(0));
 		ASSERT_EQ(nullptr, oct_tree.getChild(1));
 		ASSERT_EQ(nullptr, oct_tree.getChild(2));
@@ -59,8 +59,8 @@ public:
 		ASSERT_EQ(nullptr, oct_tree.getChild(5));
 		ASSERT_EQ(nullptr, oct_tree.getChild(6));
 		ASSERT_EQ(nullptr, oct_tree.getChild(7));
-#endif
 	}
+#endif
 
 protected:
 	void
-- 
GitLab