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<
This commit is contained in:
richiesams
2013-08-04 13:32:15 -05:00
parent 24dc3e1793
commit 29061acd4e
+7
View File
@@ -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