summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-18 19:44:14 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-18 21:55:43 (GMT)
commite96b5d14f9f3500b2221e9afedfacabb0a56bb4c (patch)
tree242b3a3c35d604973ae7150aef12b775702928ec /Source/cmListFileCache.cxx
parent7eb0dfa0622afe078c2e131ee1cbad293960b634 (diff)
downloadCMake-e96b5d14f9f3500b2221e9afedfacabb0a56bb4c.zip
CMake-e96b5d14f9f3500b2221e9afedfacabb0a56bb4c.tar.gz
CMake-e96b5d14f9f3500b2221e9afedfacabb0a56bb4c.tar.bz2
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.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index ddcea9b..d8d339a 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;
+}