From 62fa3858d12f163de7db81f6e2be770e39783238 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 29 Dec 2025 21:26:24 +0100 Subject: solver3: Modernize std::find() to std::ranges::contains Where applicable --- apt-pkg/solver3.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-pkg/solver3.h') diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index facba4d39..6fa00933f 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -166,8 +166,8 @@ struct Var } // \brief Check if there is no reason. constexpr bool empty() const { return value == 0; } - constexpr bool operator!=(Var const other) const { return value != other.value; } - constexpr bool operator==(Var const other) const { return value == other.value; } + constexpr bool operator!=(Var const other) const noexcept { return value != other.value; } + constexpr bool operator==(Var const other) const noexcept { return value == other.value; } /// \brief Negate constexpr Lit operator~() const; @@ -206,8 +206,8 @@ struct Lit // Properties constexpr bool empty() const { return value == 0; } - constexpr bool operator!=(Lit const other) const { return value != other.value; } - constexpr bool operator==(Lit const other) const { return value == other.value; } + constexpr bool operator!=(Lit const other) const noexcept { return value != other.value; } + constexpr bool operator==(Lit const other) const noexcept { return value == other.value; } std::string toString(pkgCache &cache) const { return (sign() ? "not " : "") + var().toString(cache); } }; -- cgit v1.2.3-70-g09d2