Skip to content

Commit

Permalink
Fix parentheses warnings
Browse files Browse the repository at this point in the history
Fix using the result of an assignment as a condition without
parentheses.
  • Loading branch information
a-andre authored and svigerske committed Jul 30, 2024
1 parent 4e825ee commit e8c5e9f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/CbcSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2102,7 +2102,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
}

if (cbcParam->type() == CoinParam::paramDbl) {
if (status = cbcParam->readValue(inputQueue, dValue, &message)){
if ((status = cbcParam->readValue(inputQueue, dValue, &message))){
printGeneralMessage(model_, message);
continue;
}
Expand Down Expand Up @@ -2168,7 +2168,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
break;
}
} else if (clpParam->type() == CoinParam::paramDbl) {
if (status = clpParam->readValue(inputQueue, dValue, &message)){
if ((status = clpParam->readValue(inputQueue, dValue, &message))){
printGeneralMessage(model_, message);
continue;
}
Expand All @@ -2178,7 +2178,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
continue;
}
} else if (cbcParam->type() == CoinParam::paramInt){
if (status = cbcParam->readValue(inputQueue, iValue, &message)){
if ((status = cbcParam->readValue(inputQueue, iValue, &message))){
printGeneralMessage(model_, message);
continue;
}
Expand Down Expand Up @@ -2364,7 +2364,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
}
}
} else if (clpParam->type() == CoinParam::paramInt) {
if (status = clpParam->readValue(inputQueue, iValue, &message)){
if ((status = clpParam->readValue(inputQueue, iValue, &message))){
printGeneralMessage(model_, message);
continue;
}
Expand Down Expand Up @@ -2396,7 +2396,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
dualize = iValue;
}
} else if (cbcParam->type() == CoinParam::paramKwd) {
if (status = cbcParam->readValue(inputQueue, field, &message)){
if ((status = cbcParam->readValue(inputQueue, field, &message))){
printGeneralMessage(model_, message);
continue;
}
Expand Down Expand Up @@ -2571,7 +2571,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
break;
}
} else if (clpParam->type() == CoinParam::paramKwd) {
if (status = clpParam->readValue(inputQueue, field, &message)){
if ((status = clpParam->readValue(inputQueue, field, &message))){
printGeneralMessage(model_, message);
continue;
}
Expand Down Expand Up @@ -2710,7 +2710,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
break;
}
} else if (cbcParam->type() == CoinParam::paramDir){
if (status = cbcParam->readValue(inputQueue, field, &message)){
if ((status = cbcParam->readValue(inputQueue, field, &message))){
printGeneralMessage(model_, message);
continue;
}
Expand All @@ -2719,7 +2719,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
continue;
}
} else if (cbcParam->type() == CoinParam::paramFile){
if (status = cbcParam->readValue(inputQueue, field, &message)){
if ((status = cbcParam->readValue(inputQueue, field, &message))){
printGeneralMessage(model_, message);
continue;
}
Expand Down Expand Up @@ -3343,7 +3343,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
continue;
}
// get bound
if (status = clpParam->readValue(inputQueue, dValue, &message)){
if ((status = clpParam->readValue(inputQueue, dValue, &message))){
std::cout << "Must enter value for " << clpParam->name()
<< std::endl;
continue;
Expand Down Expand Up @@ -10204,7 +10204,7 @@ int CbcMain1(std::deque<std::string> inputQueue, CbcModel &model,
}
} break;
case CbcParam::PRINTMASK:
if (status = cbcParam->readValue(inputQueue, field, &message)){
if ((status = cbcParam->readValue(inputQueue, field, &message))){
printGeneralMessage(model_, message);
continue;
}
Expand Down

0 comments on commit e8c5e9f

Please sign in to comment.