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