diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index 56e7f17233..4b03736258 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