From 29061acd4ebeef2686b2ee2ff9c97d6ee4f11e91 Mon Sep 17 00:00:00 2001 From: richiesams Date: Thu, 11 Jul 2013 00:44:23 -0500 Subject: ZVISION: Add operator< to the Puzzle struct ScriptManager does a unique-fication of a container of Puzzles using a sort with some other logic. The sort uses operator< --- engines/zvision/puzzle.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines/zvision') diff --git a/engines/zvision/puzzle.h b/engines/zvision/puzzle.h index 7a2755fd69..b3831d4665 100644 --- a/engines/zvision/puzzle.h +++ b/engines/zvision/puzzle.h @@ -64,6 +64,13 @@ struct Puzzle { // This has to be list of pointers because ResultAction is abstract Common::List resultActions; byte flags; + + // Used by the ScriptManager to allow unique-ification of _referenceTable + // The unique-ification is done by sorting, then iterating and removing duplicates + // The sort uses operator< + const bool operator<(const Puzzle &other) const { + return key < other.key; + } }; } // End of namespace ZVision -- cgit v1.2.3