MCPcopy Create free account
hub / github.com/Kitware/CMake / RemoveWatch

Method RemoveWatch

Source/cmVariableWatch.cxx:46–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void cmVariableWatch::RemoveWatch(std::string const& variable,
47 WatchMethod method, void* client_data /*=0*/)
48{
49 if (!this->WatchMap.count(variable)) {
50 return;
51 }
52 cmVariableWatch::VectorOfPairs* vp = &this->WatchMap[variable];
53 cmVariableWatch::VectorOfPairs::iterator it;
54 for (it = vp->begin(); it != vp->end(); ++it) {
55 if ((*it)->Method == method &&
56 // If client_data is NULL, we want to disconnect all watches against
57 // the given method; otherwise match ClientData as well.
58 (!client_data || (client_data == (*it)->ClientData))) {
59 vp->erase(it);
60 return;
61 }
62 }
63}
64
65bool cmVariableWatch::VariableAccessed(std::string const& variable,
66 int access_type, char const* newValue,

Callers 2

~ImplMethod · 0.80
UnwatchUnusedCliMethod · 0.80

Calls 4

eraseMethod · 0.80
countMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected