remove redunant assignment of boolean flag

release/4.3a0
Varun Agrawal 2024-10-26 18:08:30 -04:00
parent e7dea39562
commit 0271eb637c
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ double lineSearch(const S &system, const V currentValues, const W &gradient) {
double newError = system.error(newValues);
while (true) {
const bool flag = (maxStep - newStep > newStep - minStep) ? true : false;
const bool flag = (maxStep - newStep > newStep - minStep);
const double testStep = flag ? newStep + resphi * (maxStep - newStep)
: newStep - resphi * (newStep - minStep);