Skip to content

Commit

Permalink
Merge pull request #11371 from m-chaturvedi/fix_asan_mojave
Browse files Browse the repository at this point in the history
Fix an ASan issue in cost_test.cc
  • Loading branch information
jamiesnape authored May 6, 2019
2 parents cf02601 + 433311b commit 83a0e32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions solvers/test/cost_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ template <typename C, typename BoundType, typename... Args>
void VerifyRelatedCost(const Ref<const VectorXd>& x_value, Args&&... args) {
// Ensure that a constraint constructed in a particular fashion yields
// equivalent results to its shim, and the related cost.
const auto inf = std::numeric_limits<double>::infinity();
auto lb = -BoundType(-inf);
auto ub = BoundType(inf);
const double inf = std::numeric_limits<double>::infinity();
BoundType lb = -BoundType(-inf);
BoundType ub = BoundType(inf);
C constraint(std::forward<Args>(args)..., lb, ub);
typename related_cost<C>::type cost(std::forward<Args>(args)...);
VectorXd y_expected, y;
Expand Down

0 comments on commit 83a0e32

Please sign in to comment.