Slight optimization of GLGizmoSimplify::process():
Moved a static variable from inside a lambda outside as the static inner variable initialization & access has to be made thread safe.
This commit is contained in:
parent
ae8e0311d7
commit
fbe4695958
@ -283,11 +283,11 @@ void GLGizmoSimplify::process()
|
||||
}
|
||||
};
|
||||
|
||||
std::function<void(int)> statusfn = [this](int percent) {
|
||||
int64_t last = 0;
|
||||
std::function<void(int)> statusfn = [this, &last](int percent) {
|
||||
m_progress = percent;
|
||||
|
||||
// check max 4fps
|
||||
static int64_t last = 0;
|
||||
int64_t now = m_parent.timestamp_now();
|
||||
if ((now - last) < 250) return;
|
||||
last = now;
|
||||
|
Loading…
Reference in New Issue
Block a user