Skip to content

Commit 397e026

Browse files
committed
Two minor changes
1 parent 61c1a1b commit 397e026

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/io/HMpsFF.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,12 +2036,12 @@ double HMpsFF::getValue(const std::string& word, bool& is_nan,
20362036
const HighsInt id) const {
20372037
// Lambda to replace any d or D by E
20382038
auto dD2e = [&](std::string& word) {
2039-
HighsInt ix = word.find("D");
2040-
if (ix >= 0) {
2039+
size_t ix = word.find("D");
2040+
if (ix != std::string::npos) {
20412041
word.replace(ix, 1, "E");
20422042
} else {
20432043
ix = word.find("d");
2044-
if (ix >= 0) word.replace(ix, 1, "E");
2044+
if (ix != std::string::npos) word.replace(ix, 1, "E");
20452045
}
20462046
};
20472047

src/lp_data/HighsModelUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ bool hasNamesWithSpaces(const HighsLogOptions& log_options,
319319
const std::vector<std::string>& names) {
320320
HighsInt num_names_with_spaces = 0;
321321
for (HighsInt ix = 0; ix < num_name; ix++) {
322-
HighsInt space_pos = names[ix].find(" ");
323-
if (space_pos >= 0) {
322+
size_t space_pos = names[ix].find(" ");
323+
if (space_pos != std::string::npos) {
324324
if (num_names_with_spaces == 0) {
325325
highsLogDev(
326326
log_options, HighsLogType::kInfo,

0 commit comments

Comments
 (0)