mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-12 22:11:50 +08:00
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;
|
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…
x
Reference in New Issue
Block a user