MCPcopy Create free account
hub / github.com/Kitware/TeleSculptor / RecursionGuard

Method RecursionGuard

gui/MainWindow.cxx:243–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241{
242public:
243 RecursionGuard(bool* lock) : lock{lock && !*lock ? lock : nullptr}
244 {
245 if (this->lock) *this->lock = true;
246 }
247
248 RecursionGuard(RecursionGuard&& other) : RecursionGuard{other.take()} {}
249 ~RecursionGuard() { if (this->lock) *this->lock = false; }

Callers

nothing calls this directly

Calls 1

takeMethod · 0.80

Tested by

no test coverage detected