diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-18 21:44:14 +0200 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-18 23:55:43 +0200 |
commit | e96b5d14f9f3500b2221e9afedfacabb0a56bb4c (patch) | |
tree | 242b3a3c35d604973ae7150aef12b775702928ec /Source/cmListFileCache.cxx | |
parent | 7eb0dfa0622afe078c2e131ee1cbad293960b634 (diff) | |
download | cmake-e96b5d14f9f3500b2221e9afedfacabb0a56bb4c.tar.gz |
cmListFileContext: Implement LessThanComparable.
Move wrapping existing code from cmMakefile, and simplify the
implementation there.
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r-- | Source/cmListFileCache.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index ddcea9b13e..d8d339ab30 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -431,3 +431,11 @@ std::ostream& operator<<(std::ostream& os, cmListFileContext const& lfc) } return os; } + +bool operator<(const cmListFileContext& lhs, const cmListFileContext& rhs) +{ + if(lhs.FilePath != rhs.FilePath) + return lhs.FilePath < rhs.FilePath; + + return lhs.Line < rhs.Line; +} |