summaryrefslogtreecommitdiffstats
path: root/Source/cmAlgorithms.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-20 20:52:09 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-23 19:19:35 (GMT)
commitcb75eec0b45eda230996580043e00e38d35a1e5b (patch)
tree0f0982d96d55b4f43304e21d9c200a0dfc90cd4c /Source/cmAlgorithms.h
parent7e576624bbe77df9879075d48652defdf0cbce62 (diff)
downloadCMake-cb75eec0b45eda230996580043e00e38d35a1e5b.zip
CMake-cb75eec0b45eda230996580043e00e38d35a1e5b.tar.gz
CMake-cb75eec0b45eda230996580043e00e38d35a1e5b.tar.bz2
cmAlgorithms: Add const to const objects.
Diffstat (limited to 'Source/cmAlgorithms.h')
-rw-r--r--Source/cmAlgorithms.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index b9bd67b..56e7f17 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -84,7 +84,7 @@ private:
template<typename FwdIt>
FwdIt cmRotate(FwdIt first, FwdIt middle, FwdIt last)
{
- typename std::iterator_traits<FwdIt>::difference_type dist =
+ const typename std::iterator_traits<FwdIt>::difference_type dist =
std::distance(middle, last);
std::rotate(first, middle, last);
std::advance(first, dist);
@@ -204,7 +204,7 @@ std::string cmJoin(Range const& r, const char* delimiter)
std::ostringstream os;
typedef typename Range::value_type ValueType;
typedef typename Range::const_iterator InputIt;
- InputIt first = r.begin();
+ const InputIt first = r.begin();
InputIt last = r.end();
--last;
std::copy(first, last,
@@ -260,7 +260,7 @@ typename Range::const_iterator cmRemoveDuplicates(Range& r)
for(typename Range::const_iterator it = r.begin();
it != r.end(); ++it, ++count)
{
- typename Range::iterator low =
+ const typename Range::iterator low =
std::lower_bound(unique.begin(), unique.end(), *it);
if (low == unique.end() || *low != *it)
{