X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Freverseaction.h;fp=src%2Freverseaction.h;h=267aeaa84bdc11cdec6dcadce0ecc114b4d10782;hb=6b0585c4c6aa12aad13965d5f17be9a4a51653b5;hp=e0857803518b2d4aa5acaa72f0c7cfe89f41bf4f;hpb=623097444fac1993a86e6d73b203bc3c6d731c11;p=germs.git diff --git a/src/reverseaction.h b/src/reverseaction.h index e085780..267aeaa 100644 --- a/src/reverseaction.h +++ b/src/reverseaction.h @@ -63,6 +63,14 @@ class ReverseAction : public SortActionImpl{ return false; } + virtual bool operator<(const SortActionImpl& sa) const{ + if (const ReverseAction* psa = dynamic_cast(&sa)){ + if (_i < psa->_i || (_i == psa->_i && _j < psa->_j)) + return true; + } + return false; + } + /** * Gives a string representation of the action, for output */