From 8c678126f185dceae3e778803dea8270a2d3a80d Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Mon, 24 Jun 2013 16:55:58 -0400 Subject: [PATCH] Remove GUARANTEE macro --- Util/GraphLoader.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Util/GraphLoader.h b/Util/GraphLoader.h index 8dc45b756..5dc50f888 100644 --- a/Util/GraphLoader.h +++ b/Util/GraphLoader.h @@ -27,6 +27,7 @@ or see http://www.gnu.org/licenses/agpl.txt. #include "../DataStructures/Restriction.h" #include "../typedefs.h" +#include #include #include @@ -116,9 +117,9 @@ NodeID readBinaryOSRMGraphFromStream(std::istream &in, std::vector& edgeL in.read((char*)&isAccessRestricted, sizeof(bool)); in.read((char*)&isContraFlow, sizeof(bool)); - GUARANTEE(length > 0, "loaded null length edge" ); - GUARANTEE(weight > 0, "loaded null weight"); - GUARANTEE(0<=dir && dir<=2, "loaded bogus direction"); + BOOST_ASSERT_MSG(length > 0, "loaded null length edge" ); + BOOST_ASSERT_MSG(weight > 0, "loaded null weight"); + BOOST_ASSERT_MSG(0<=dir && dir<=2, "loaded bogus direction"); bool forward = true; bool backward = true; @@ -144,7 +145,9 @@ NodeID readBinaryOSRMGraphFromStream(std::istream &in, std::vector& edgeL continue; } target = intNodeID->second; - GUARANTEE(source != UINT_MAX && target != UINT_MAX, "nonexisting source or target"); + BOOST_ASSERT_MSG(source != UINT_MAX && target != UINT_MAX, + "nonexisting source or target" + ); if(source > target) { std::swap(source, target);