summaryrefslogtreecommitdiffstats
path: root/Source/cmAlgorithms.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-18 17:49:29 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-02-18 17:49:29 (GMT)
commit93a38a2abccf9041fa86a7a6cf3439b1b0480ad1 (patch)
tree36944c0e1123e3a0a70ecfb4a75e1b8a68761e16 /Source/cmAlgorithms.h
parent4fb9e847c0c757ff6e1ee430bbb9fc2b6b4e2ae6 (diff)
parent6652afe66961bcbb5ff17dd7b8a3a91da62f2712 (diff)
downloadCMake-93a38a2abccf9041fa86a7a6cf3439b1b0480ad1.zip
CMake-93a38a2abccf9041fa86a7a6cf3439b1b0480ad1.tar.gz
CMake-93a38a2abccf9041fa86a7a6cf3439b1b0480ad1.tar.bz2
Merge topic 'minor-cleanups'
6652afe6 CTest: Use clear instead of erase-all. 75661fdf cmListCommand: Move size variable out of loop. 10e53e23 cmAlgorithms: Add missing const to functors. 74906322 cmAlgorithms: Remove sort of already-sorted container. 2acd04c9 cmcmd: Remove some comment copy-pasta. 2d833232 cmCoreTryCompile: Remove variable assignment. 26602cf5 cmLocalGenerator: Move variable population inside of condition. cfb84834 Update comment to match recent dashboard testing. 6010f936 Revert "cmGlobalGenerator: Fix value type pushed into autogens vector" 0550b9e3 Revert "Attempt to fix the compile of cmake on Sun CC." 1ee4721f Help: Fix formatting of command parameter. 62429a1e cmGlobalGenerator: Remove unneeded pointer check. c697c1fa cmTarget: Remove template argument workaround.
Diffstat (limited to 'Source/cmAlgorithms.h')
-rw-r--r--Source/cmAlgorithms.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index a996088..8491838 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -99,7 +99,7 @@ template<typename Container,
bool valueTypeIsPair = cmIsPair<typename Container::value_type>::value>
struct DefaultDeleter
{
- void operator()(typename Container::value_type value) {
+ void operator()(typename Container::value_type value) const {
delete value;
}
};
@@ -107,7 +107,7 @@ struct DefaultDeleter
template<typename Container>
struct DefaultDeleter<Container, /* valueTypeIsPair = */ true>
{
- void operator()(typename Container::value_type value) {
+ void operator()(typename Container::value_type value) const {
delete value.second;
}
};
@@ -163,7 +163,7 @@ struct BinarySearcher
{
}
- bool operator()(argument_type const& item)
+ bool operator()(argument_type const& item) const
{
return std::binary_search(m_range.begin(), m_range.end(), item);
}
@@ -275,7 +275,6 @@ typename Range::const_iterator cmRemoveDuplicates(Range& r)
{
return r.end();
}
- std::sort(indices.begin(), indices.end());
return cmRemoveIndices(r, indices);
}