summaryrefslogtreecommitdiff
path: root/apt-pkg/solver3.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-12-29 21:26:24 +0100
committerJulian Andres Klode <jak@debian.org>2026-01-05 21:20:24 +0000
commit62fa3858d12f163de7db81f6e2be770e39783238 (patch)
treea628a7cc467f3d7a276fdda245c0e299752ae5d3 /apt-pkg/solver3.h
parentf02f90021c255ef3aa578e00758cbc62e7fc82dd (diff)
solver3: Modernize std::find() to std::ranges::contains
Where applicable
Diffstat (limited to 'apt-pkg/solver3.h')
-rw-r--r--apt-pkg/solver3.h8
1 files changed, 4 insertions, 4 deletions
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); }
};