1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-16 22:37:30 +08:00

cmListFileContext: Implement LessThanComparable.

Move wrapping existing code from cmMakefile, and simplify the
implementation there.
This commit is contained in:
Stephen Kelly
2015-05-18 21:44:14 +02:00
parent 7eb0dfa062
commit e96b5d14f9
4 changed files with 11 additions and 23 deletions

View File

@@ -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;
}