summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-03-04 22:23:47 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-03-06 20:06:40 +0100
commit7d5fe59c19edf06cbee3e0b34d71032322907ae6 (patch)
tree41d32e46e45637e52fa679400011b92594af4c0d /apt-pkg
parent7194a6b39c2aa6f1006630975a1bf4ffc3c9daf2 (diff)
solver3: cleanup operators for Var
Particularly, use single line and implement operator!=
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/solver3.h11
1 files 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
{