mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user