Wildmeshing Toolkit
Loading...
Searching...
No Matches
OperationDryRun.hpp
1#pragma once
2
3namespace wmtk {
4
32inline bool& operation_dry_run()
33{
34 static thread_local bool flag = false;
35 return flag;
36}
37
41{
43 : m_previous(operation_dry_run())
44 {
45 operation_dry_run() = true;
46 }
47 ~OperationDryRunScope() { operation_dry_run() = m_previous; }
49 OperationDryRunScope& operator=(const OperationDryRunScope&) = delete;
50
51private:
52 bool m_previous;
53};
54
55} // namespace wmtk
Definition OperationDryRun.hpp:41