From 47a3e22ea5aee971df1e04a6447bb916af81aa2c Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 20 Feb 2015 21:52:36 +0100 Subject: cmAlgorithms: Rename template type in cmDeleteAll algorithm. It may be any range, not only a container. --- Source/cmAlgorithms.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index 56e7f17..4b03736 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -105,19 +105,19 @@ struct cmIsPair > enum { value = true }; }; -template::value> +template::value> struct DefaultDeleter { - void operator()(typename Container::value_type value) const { + void operator()(typename Range::value_type value) const { delete value; } }; -template -struct DefaultDeleter +template +struct DefaultDeleter { - void operator()(typename Container::value_type value) const { + void operator()(typename Range::value_type value) const { delete value.second; } }; @@ -187,11 +187,11 @@ cmRange(Range const& range) range.begin(), range.end()); } -template -void cmDeleteAll(Container const& c) +template +void cmDeleteAll(Range const& r) { - std::for_each(c.begin(), c.end(), - ContainerAlgorithms::DefaultDeleter()); + std::for_each(r.begin(), r.end(), + ContainerAlgorithms::DefaultDeleter()); } template -- cgit v0.12