mirror of
https://github.com/reactos/CMake.git
synced 2024-12-16 08:07:29 +00:00
cmState: Make Snapshot EqualityComparable.
This commit is contained in:
parent
9b44018d52
commit
af9fc27753
@ -1701,3 +1701,13 @@ std::vector<std::string> cmState::Directory::GetPropertyKeys() const
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs)
|
||||
{
|
||||
return lhs.Position == rhs.Position;
|
||||
}
|
||||
|
||||
bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs)
|
||||
{
|
||||
return lhs.Position != rhs.Position;
|
||||
}
|
||||
|
@ -93,6 +93,10 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
friend bool operator==(const cmState::Snapshot& lhs,
|
||||
const cmState::Snapshot& rhs);
|
||||
friend bool operator!=(const cmState::Snapshot& lhs,
|
||||
const cmState::Snapshot& rhs);
|
||||
friend class cmState;
|
||||
friend class Directory;
|
||||
friend struct StrictWeakOrder;
|
||||
@ -314,4 +318,7 @@ private:
|
||||
bool MSYSShell;
|
||||
};
|
||||
|
||||
bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs);
|
||||
bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user