Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9935abce authored by Chris Craik's avatar Chris Craik
Browse files

Correct PatchCache comparison logic

Change-Id: I3d0832505b5380bfa362863b39e09dd10f792582
parent 8d1a6af4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -51,10 +51,10 @@ int PatchCache::PatchDescription::compare(
    if (deltaInt != 0) return deltaInt;

    if (lhs.pixelWidth < rhs.pixelWidth) return -1;
    if (lhs.pixelWidth > lhs.pixelWidth) return +1;
    if (lhs.pixelWidth > rhs.pixelWidth) return +1;

    if (lhs.pixelHeight < rhs.pixelHeight) return -1;
    if (lhs.pixelHeight > lhs.pixelHeight) return +1;
    if (lhs.pixelHeight > rhs.pixelHeight) return +1;

    deltaInt = lhs.xCount - rhs.xCount;
    if (deltaInt != 0) return deltaInt;