X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Fsortaction.h;fp=src%2Fsortaction.h;h=a1c5566acb16673368d5c3fc9260f9c68a055311;hb=6b0585c4c6aa12aad13965d5f17be9a4a51653b5;hp=a99f786988b88a9cb238fc77122fb6a14aa5d4f2;hpb=623097444fac1993a86e6d73b203bc3c6d731c11;p=germs.git diff --git a/src/sortaction.h b/src/sortaction.h index a99f786..a1c5566 100644 --- a/src/sortaction.h +++ b/src/sortaction.h @@ -44,7 +44,12 @@ class SortActionImpl{ * Compares sort actions. */ virtual bool operator==(const SortActionImpl& sa) const = 0; - + + /** + * Compares sort actions. + */ + virtual bool operator<(const SortActionImpl& sa) const = 0; + /** * Gives a string representation of the action, for output */ @@ -92,6 +97,13 @@ class SortAction{ return (*_action) == (*sa._action); } + /** + * Compares sort actions. + */ + bool operator<(const SortAction& sa) const{ + return (*_action) < (*sa._action); + } + /** * Compares sort actions. */