From 7d5fe59c19edf06cbee3e0b34d71032322907ae6 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 4 Mar 2025 22:23:47 +0100 Subject: solver3: cleanup operators for Var Particularly, use single line and implement operator!= --- apt-pkg/solver3.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index 6e45d5f45..73ed26030 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -339,14 +339,9 @@ struct APT::Solver::Var return isVersion() ? Ver(cache).ParentPkg() : Pkg(cache); } // \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 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; } std::string toString(pkgCache &cache) const { -- cgit v1.2.3-70-g09d2