From 2130896fbe93960141aa08b85cb410c726834314 Mon Sep 17 00:00:00 2001 From: Stefan Vigerske Date: Sat, 21 Dec 2024 19:15:24 +0100 Subject: [PATCH] fix compiler warnings - clarify if condition - declare local function static --- src/lp_data/HighsInterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lp_data/HighsInterface.cpp b/src/lp_data/HighsInterface.cpp index 1c7ad16b9f..24efc8b02c 100644 --- a/src/lp_data/HighsInterface.cpp +++ b/src/lp_data/HighsInterface.cpp @@ -3615,7 +3615,7 @@ bool Highs::hasRepeatedLinearObjectivePriorities( // O(n^2), but who will have more than O(1) linear objectives! HighsInt num_linear_objective = this->multi_linear_objective_.size(); if (num_linear_objective <= 0 || - num_linear_objective <= 1 && !linear_objective) + (num_linear_objective <= 1 && !linear_objective)) return false; for (HighsInt iObj0 = 0; iObj0 < num_linear_objective; iObj0++) { HighsInt priority0 = this->multi_linear_objective_[iObj0].priority; @@ -3630,8 +3630,8 @@ bool Highs::hasRepeatedLinearObjectivePriorities( return false; } -bool comparison(std::pair x1, - std::pair x2) { +static bool comparison(std::pair x1, + std::pair x2) { return x1.first >= x2.first; }