From 687f0c7dc0324192d71f2165552e81a9d4346b4a Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 22 Nov 2016 22:30:58 -0800 Subject: [PATCH] Use const parameters in std::sort lambda. (#364) This is more correct, and non-const fails on gcc 4.8. --- hal/lib/athena/SerialHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hal/lib/athena/SerialHelper.cpp b/hal/lib/athena/SerialHelper.cpp index 79c6a8c16d..5361d80d52 100644 --- a/hal/lib/athena/SerialHelper.cpp +++ b/hal/lib/athena/SerialHelper.cpp @@ -110,8 +110,8 @@ void SerialHelper::SortHubPathVector() { m_sortedHubPath.clear(); m_sortedHubPath = m_unsortedHubPath; std::sort(m_sortedHubPath.begin(), m_sortedHubPath.end(), - [](llvm::SmallVectorImpl& lhs, - llvm::SmallVectorImpl& rhs) -> int { + [](const llvm::SmallVectorImpl& lhs, + const llvm::SmallVectorImpl& rhs) -> int { llvm::StringRef lhsRef(lhs.begin(), lhs.size()); llvm::StringRef rhsRef(rhs.begin(), rhs.size()); return lhsRef.compare(rhsRef);