@@ -311,16 +311,14 @@ class TargetCalculator {
311311 if (has_zero_limits) {
312312 if constexpr (throw_error) {
313313 throw RuckigError (" zero limits conflict in step 1, dof: " + std::to_string (dof) + " input: " + inp.to_string ());
314- } else {
315- return Result::ErrorZeroLimits;
316314 }
315+ return Result::ErrorZeroLimits;
317316
318317 } else {
319318 if constexpr (throw_error) {
320319 throw RuckigError (" error in step 1, dof: " + std::to_string (dof) + " input: " + inp.to_string ());
321- } else {
322- return Result::ErrorExecutionTimeCalculation;
323320 }
321+ return Result::ErrorExecutionTimeCalculation;
324322 }
325323 }
326324
@@ -350,16 +348,14 @@ class TargetCalculator {
350348 if (has_zero_limits) {
351349 if constexpr (throw_error) {
352350 throw RuckigError (" zero limits conflict with other degrees of freedom in time synchronization " + std::to_string (traj.duration ));
353- } else {
354- return Result::ErrorZeroLimits;
355351 }
352+ return Result::ErrorZeroLimits;
356353
357354 } else {
358355 if constexpr (throw_error) {
359356 throw RuckigError (" error in time synchronization: " + std::to_string (traj.duration ));
360- } else {
361- return Result::ErrorSynchronizationCalculation;
362357 }
358+ return Result::ErrorSynchronizationCalculation;
363359 }
364360 }
365361
@@ -515,9 +511,8 @@ class TargetCalculator {
515511 if (!found_time_synchronization) {
516512 if constexpr (throw_error) {
517513 throw RuckigError (" error in step 2 in dof: " + std::to_string (dof) + " for t sync: " + std::to_string (traj.duration ) + " input: " + inp.to_string ());
518- } else {
519- return Result::ErrorSynchronizationCalculation;
520514 }
515+ return Result::ErrorSynchronizationCalculation;
521516 }
522517 // std::cout << dof << " profile step2: " << p.to_string() << std::endl;
523518 }
0 commit comments