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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user