diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-07 20:26:07 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-07 20:26:07 (GMT) |
commit | ffaaedc7c6c9ae6e4d2fd3a3f4b6d576742831ae (patch) | |
tree | 49f6253ea90e0fbafcf954bf49a7dfde18458a33 /Source/cmVariableWatch.cxx | |
parent | 81b5c3b34d9420c91c2269e33bb991e705cd8d4e (diff) | |
download | CMake-ffaaedc7c6c9ae6e4d2fd3a3f4b6d576742831ae.zip CMake-ffaaedc7c6c9ae6e4d2fd3a3f4b6d576742831ae.tar.gz CMake-ffaaedc7c6c9ae6e4d2fd3a3f4b6d576742831ae.tar.bz2 |
ENH: Add remove watch
Diffstat (limited to 'Source/cmVariableWatch.cxx')
-rw-r--r-- | Source/cmVariableWatch.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmVariableWatch.cxx b/Source/cmVariableWatch.cxx index 74548fb..2f5bd03 100644 --- a/Source/cmVariableWatch.cxx +++ b/Source/cmVariableWatch.cxx @@ -44,6 +44,20 @@ void cmVariableWatch::AddWatch(const std::string& variable, vp->push_back(p); } +void cmVariableWatch::RemoveWatch(const std::string& variable, WatchMethod method) +{ + cmVariableWatch::VectorOfPairs* vp = &m_WatchMap[variable]; + cmVariableWatch::VectorOfPairs::iterator it; + for ( it = vp->begin(); it != vp->end(); ++it ) + { + if ( it->m_Method == method ) + { + vp->erase(it); + return; + } + } +} + void cmVariableWatch::VariableAccessed(const std::string& variable, int access_type) const { cmVariableWatch::StringToVectorOfPairs::const_iterator mit = m_WatchMap.find(variable); |