mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-15 14:27:29 +00:00
Dodges a lambda copy.
This commit is contained in:
@@ -91,7 +91,7 @@ class Speaker {
|
|||||||
std::shared_ptr<std::list<std::function<void(void)>>> queued_functions = queued_functions_;
|
std::shared_ptr<std::list<std::function<void(void)>>> queued_functions = queued_functions_;
|
||||||
queued_functions_.reset();
|
queued_functions_.reset();
|
||||||
_queue->enqueue([queued_functions] {
|
_queue->enqueue([queued_functions] {
|
||||||
for(auto function : *queued_functions) {
|
for(auto &function : *queued_functions) {
|
||||||
function();
|
function();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user