Skip to content

Commit d2979ac

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent efb5d4f commit d2979ac

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

Diff for: include/hpp/core/continuous-validation.hh

+3-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ class HPP_CORE_DLLAPI ContinuousValidation : public PathValidation,
220220
void breakDistance(value_type distance);
221221

222222
/// TODO
223-
value_type distanceLowerBoundThreshold() const { return distanceLowerBoundThr_; }
223+
value_type distanceLowerBoundThreshold() const {
224+
return distanceLowerBoundThr_;
225+
}
224226

225227
/// TODO
226228
void distanceLowerBoundThreshold(value_type distance);

Diff for: src/continuous-validation.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ void ContinuousValidation::removeObstacleFromJoint(
256256
void ContinuousValidation::breakDistance(value_type distance) {
257257
assert(distance >= 0);
258258
if (distance <= distanceLowerBoundThr_) {
259-
throw std::invalid_argument("Break distance must be strictly greater than "
259+
throw std::invalid_argument(
260+
"Break distance must be strictly greater than "
260261
"the distance lower bound threshold.");
261262
}
262263
breakDistance_ = distance;
@@ -272,7 +273,8 @@ void ContinuousValidation::breakDistance(value_type distance) {
272273
void ContinuousValidation::distanceLowerBoundThreshold(value_type distance) {
273274
assert(distance >= 0);
274275
if (distance >= breakDistance_) {
275-
throw std::invalid_argument("Distance lower bound threshold must be "
276+
throw std::invalid_argument(
277+
"Distance lower bound threshold must be "
276278
"strictly smaller than the break distance.");
277279
}
278280
distanceLowerBoundThr_ = distance;

Diff for: tests/test-continuous-validation.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ using hpp::core::CollisionValidation;
6060
using hpp::core::Configuration_t;
6161
using hpp::core::ConfigurationShooterPtr_t;
6262
using hpp::core::ConfigValidationPtr_t;
63-
using hpp::core::value_type;
6463
using hpp::core::matrix_t;
6564
using hpp::core::PathPtr_t;
6665
using hpp::core::PathValidationPtr_t;
@@ -70,11 +69,12 @@ using hpp::core::ProblemPtr_t;
7069
using hpp::core::size_type;
7170
using hpp::core::SteeringMethodPtr_t;
7271
using hpp::core::ValidationReportPtr_t;
72+
using hpp::core::value_type;
7373
using hpp::core::vector_t;
7474
using hpp::core::configurationShooter::Uniform;
75+
using hpp::core::continuousCollisionChecking::Progressive;
7576
using hpp::core::continuousValidation::Dichotomy;
7677
using hpp::core::continuousValidation::DichotomyPtr_t;
77-
using hpp::core::continuousCollisionChecking::Progressive;
7878
using hpp::core::pathValidation::createDiscretizedCollisionChecking;
7979
using hpp::core::steeringMethod::Straight;
8080

@@ -497,22 +497,22 @@ BOOST_AUTO_TEST_CASE(avoid_infinite_loop_spline) {
497497
// create steering method
498498
ProblemPtr_t problem = Problem::create(robot);
499499
typedef steeringMethod::Spline<hpp::core::path::BernsteinBasis, 3> SMSpline_t;
500-
SMSpline_t::Ptr_t sm (SMSpline_t::create(problem));
500+
SMSpline_t::Ptr_t sm(SMSpline_t::create(problem));
501501
Configuration_t q1(robot->configSize()), q2(robot->configSize());
502502
PathPtr_t path;
503503
bool ok;
504504

505505
// Calculate shift
506-
std::vector<int> order = { 1 };
506+
std::vector<int> order = {1};
507507
matrix_t D1(robot->numberDof(), 1), D2(robot->numberDof(), 1);
508508

509509
q1 << -1, 0;
510510
q2 << 1.1, 0;
511511
D1 << 0, -1;
512-
D2 << 0, 1;
512+
D2 << 0, 1;
513513
path = sm->steer(q1, order, D1, q2, order, D2, 1.0);
514514
BOOST_REQUIRE_EQUAL(path->length(), 1.0);
515-
value_type shift = - path->eval(0.5, ok)[1];
515+
value_type shift = -path->eval(0.5, ok)[1];
516516

517517
// create path validation objects
518518
DichotomyPtr_t dichotomy(Dichotomy::create(robot, 0));

0 commit comments

Comments
 (0)