mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 10:10:45 +08:00
fix: bad reference
This commit is contained in:
@@ -122,7 +122,7 @@ bool asst::TaskData::lazy_parse(const json::value& json)
|
||||
|
||||
const size_t MAX_CHECKING_SIZE = 10000;
|
||||
while (!task_queue.empty() && checking_task_set.size() <= MAX_CHECKING_SIZE) {
|
||||
const std::string& name = task_queue.front();
|
||||
std::string name = std::move(task_queue.front());
|
||||
task_queue.pop();
|
||||
auto task = get(name);
|
||||
if (task == nullptr) [[unlikely]] {
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
// json[name][x] = y;
|
||||
// Task.lazy_parse(json);
|
||||
// ```
|
||||
return std::dynamic_pointer_cast<TargetTaskInfoType>(get(std::string(name)));
|
||||
return std::dynamic_pointer_cast<TargetTaskInfoType>(get(name));
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user