Add const modifiers.

This commit is contained in:
Mikhail Lozhnikov
2016-07-07 23:05:59 +03:00
parent e75a0879a1
commit cdb6b5f36c
2 changed files with 6 additions and 6 deletions
@@ -32,8 +32,8 @@ SweepNonLeafNode(const size_t axis,
}
// Sort high bounds of children.
std::sort(sorted.begin(), sorted.end(),
[] (std::pair<ElemType, size_t>& s1,
std::pair<ElemType, size_t>& s2)
[] (const std::pair<ElemType, size_t>& s1,
const std::pair<ElemType, size_t>& s2)
{
return s1.first < s2.first;
});
@@ -99,8 +99,8 @@ SweepLeafNode(const size_t axis,
// Sort high bounds of children.
std::sort(sorted.begin(), sorted.end(),
[] (std::pair<ElemType, size_t>& s1,
std::pair<ElemType, size_t>& s2)
[] (const std::pair<ElemType, size_t>& s1,
const std::pair<ElemType, size_t>& s2)
{
return s1.first < s2.first;
});
@@ -32,8 +32,8 @@ size_t MinimalSplitsNumberSweep<SplitPolicy>::SweepNonLeafNode(
// Sort candidates in order to check balancing.
std::sort(sorted.begin(), sorted.end(),
[] (std::pair<ElemType, size_t>& s1,
std::pair<ElemType, size_t>& s2)
[] (const std::pair<ElemType, size_t>& s1,
const std::pair<ElemType, size_t>& s2)
{
return s1.first < s2.first;
});