summaryrefslogtreecommitdiff
path: root/Source/cmVariableWatchCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmVariableWatchCommand.cxx')
-rw-r--r--Source/cmVariableWatchCommand.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx
index 281850ecc1..9930086f49 100644
--- a/Source/cmVariableWatchCommand.cxx
+++ b/Source/cmVariableWatchCommand.cxx
@@ -91,11 +91,9 @@ cmVariableWatchCommand::cmVariableWatchCommand()
cmVariableWatchCommand::~cmVariableWatchCommand()
{
- std::set<std::string>::const_iterator it;
- for (it = this->WatchedVariables.begin(); it != this->WatchedVariables.end();
- ++it) {
+ for (std::string const& wv : this->WatchedVariables) {
this->Makefile->GetCMakeInstance()->GetVariableWatch()->RemoveWatch(
- *it, cmVariableWatchCommandVariableAccessed);
+ wv, cmVariableWatchCommandVariableAccessed);
}
}