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
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
m_progress = percent;
|
||||||
|
|
||||||
// check max 4fps
|
// check max 4fps
|
||||||
static int64_t last = 0;
|
|
||||||
int64_t now = m_parent.timestamp_now();
|
int64_t now = m_parent.timestamp_now();
|
||||||
if ((now - last) < 250) return;
|
if ((now - last) < 250) return;
|
||||||
last = now;
|
last = now;
|
||||||
|
|
Loading…
Reference in a new issue