Skip to content

Commit 4b0101b

Browse files
author
Benjamin Chrétien
committed
Fix clang error.
roboptim-core/tests/simple.cc:112:17: error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Werror,-Wtautological-undefined-compare] BOOST_CHECK (&pb.constraints ()[0] != 0);
1 parent 2fc46d0 commit 4b0101b

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

tests/simple.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ BOOST_AUTO_TEST_CASE (simple)
109109
pb.addConstraint (boost::shared_ptr<F> (g),
110110
Function::makeInterval (0., 5.), 3.5);
111111
BOOST_CHECK_EQUAL (pb.constraints ().size (), 1u);
112-
BOOST_CHECK (&pb.constraints ()[0] != 0);
113112
BOOST_CHECK_EQUAL (pb.boundsVector ().size (), 1u);
114113
BOOST_CHECK_EQUAL (pb.boundsVector ()[0][0].first,
115114
0.);

0 commit comments

Comments
 (0)