Skip to content

Commit

Permalink
Fix clang error.
Browse files Browse the repository at this point in the history
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);
  • Loading branch information
Benjamin Chrétien committed Mar 24, 2015
1 parent 2fc46d0 commit 4b0101b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion tests/simple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ BOOST_AUTO_TEST_CASE (simple)
pb.addConstraint (boost::shared_ptr<F> (g),
Function::makeInterval (0., 5.), 3.5);
BOOST_CHECK_EQUAL (pb.constraints ().size (), 1u);
BOOST_CHECK (&pb.constraints ()[0] != 0);
BOOST_CHECK_EQUAL (pb.boundsVector ().size (), 1u);
BOOST_CHECK_EQUAL (pb.boundsVector ()[0][0].first,
0.);
Expand Down

0 comments on commit 4b0101b

Please sign in to comment.