Remove GUARANTEE macro

This commit is contained in:
Dennis Luxen 2013-06-24 16:55:58 -04:00
parent 2b0590f9bd
commit 8c678126f1

View File

@ -27,6 +27,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include "../DataStructures/Restriction.h"
#include "../typedefs.h"
#include <boost/assert.hpp>
#include <boost/unordered_map.hpp>
#include <cassert>
@ -116,9 +117,9 @@ NodeID readBinaryOSRMGraphFromStream(std::istream &in, std::vector<EdgeT>& 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<EdgeT>& 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);