mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 01:59:33 +08:00
perf: 修改异步加载资源的方式
This commit is contained in:
@@ -437,10 +437,7 @@ void Assistant::msg_proc()
|
||||
continue;
|
||||
}
|
||||
|
||||
// 结构化绑定只能是引用,后续的pop会使引用失效,所以需要重新构造一份,这里采用了move的方式
|
||||
auto&& [temp_msg, temp_detail] = m_msg_queue.front();
|
||||
AsstMsg msg = temp_msg;
|
||||
json::value detail = std::move(temp_detail);
|
||||
auto [msg, detail] = std::move(m_msg_queue.front());
|
||||
m_msg_queue.pop();
|
||||
lock.unlock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user