diff options
| author | richiesams | 2013-07-11 00:44:23 -0500 |
|---|---|---|
| committer | richiesams | 2013-08-04 13:32:15 -0500 |
| commit | 29061acd4ebeef2686b2ee2ff9c97d6ee4f11e91 (patch) | |
| tree | 09a0738986b26af0c0dc340a12da3c91080aca6c | |
| parent | 24dc3e1793749269daa30350a5923f51d7892efd (diff) | |
| download | scummvm-rg350-29061acd4ebeef2686b2ee2ff9c97d6ee4f11e91.tar.gz scummvm-rg350-29061acd4ebeef2686b2ee2ff9c97d6ee4f11e91.tar.bz2 scummvm-rg350-29061acd4ebeef2686b2ee2ff9c97d6ee4f11e91.zip | |
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<
| -rw-r--r-- | engines/zvision/puzzle.h | 7 |
1 files changed, 7 insertions, 0 deletions
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<ResultAction *> 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 |
