diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-04 22:23:47 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-06 20:06:40 +0100 |
| commit | 7d5fe59c19edf06cbee3e0b34d71032322907ae6 (patch) | |
| tree | 41d32e46e45637e52fa679400011b92594af4c0d /apt-pkg/solver3.h | |
| parent | 7194a6b39c2aa6f1006630975a1bf4ffc3c9daf2 (diff) | |
solver3: cleanup operators for Var
Particularly, use single line and implement operator!=
Diffstat (limited to 'apt-pkg/solver3.h')
| -rw-r--r-- | apt-pkg/solver3.h | 11 |
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 { |
