diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-18 19:51:42 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-18 21:55:44 (GMT) |
commit | 9645cba3bfc4bd583259130fd7e63da0c8bbecca (patch) | |
tree | 04f249064af59ccc8bda1872eb3f928599372687 /Source | |
parent | 52a8d19c9b67e5c902155f52fc7d145e091a5e7d (diff) | |
download | CMake-9645cba3bfc4bd583259130fd7e63da0c8bbecca.zip CMake-9645cba3bfc4bd583259130fd7e63da0c8bbecca.tar.gz CMake-9645cba3bfc4bd583259130fd7e63da0c8bbecca.tar.bz2 |
cmListFileContext: Implement EqualityComparable.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmListFileCache.cxx | 10 | ||||
-rw-r--r-- | Source/cmListFileCache.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 650e2e5..3e3d708 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -440,3 +440,13 @@ bool operator<(const cmListFileContext& lhs, const cmListFileContext& rhs) } return lhs.FilePath < rhs.FilePath; } + +bool operator==(const cmListFileContext& lhs, const cmListFileContext& rhs) +{ + return lhs.Line == rhs.Line && lhs.FilePath == rhs.FilePath; +} + +bool operator!=(const cmListFileContext& lhs, const cmListFileContext& rhs) +{ + return !(lhs == rhs); +} diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index da89016..d7e29d9 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -63,6 +63,8 @@ struct cmListFileContext std::ostream& operator<<(std::ostream&, cmListFileContext const&); bool operator<(const cmListFileContext& lhs, const cmListFileContext& rhs); +bool operator==(cmListFileContext const& lhs, cmListFileContext const& rhs); +bool operator!=(cmListFileContext const& lhs, cmListFileContext const& rhs); struct cmListFileFunction: public cmListFileContext { |