Closed MistEO closed 2 years ago
This workaround using std::deque is not a good way to address the problem. I inspected the issue again, and find that actually there is a bug in GNUSTL. When using std::vector as the element type of std::priority_queue (q), you cannot directly assign q.top() to a pre-defined vector using operator=. Here is the problem code:
auto last_pop = _stage_chrs; // auto == std::vector<penguin::Widget_Character>
...
last_pop = q.top(); // error
As a workaround, you can use std::vector.assign instead.
auto temp = q.top();
last_pop.assign(temp.begin(), temp.end());
The contribution from @aa889788
User stories: https://github.com/penguin-statistics/recognizer/issues/7 https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/419
Original PR: https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/462