mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-16 16:33:55 +02:00
Optimize away some potential copies
This commit is contained in:
@@ -307,7 +307,7 @@ class Vst3Bridge : public HostBridge {
|
|||||||
*/
|
*/
|
||||||
template <typename T, typename F>
|
template <typename T, typename F>
|
||||||
T do_mutual_recursion_or_handle_in_main_context(F f) {
|
T do_mutual_recursion_or_handle_in_main_context(F f) {
|
||||||
std::packaged_task<T()> do_call(f);
|
std::packaged_task<T()> do_call(std::move(f));
|
||||||
std::future<T> do_call_response = do_call.get_future();
|
std::future<T> do_call_response = do_call.get_future();
|
||||||
|
|
||||||
// If the above function is currently being called from some thread,
|
// If the above function is currently being called from some thread,
|
||||||
|
|||||||
Reference in New Issue
Block a user