fix: 修复自定义干员不选的问题,修复临时招募的精二干员不选的问题

This commit is contained in:
MistEO
2022-07-30 00:33:59 +08:00
parent 88fc9ef6fb
commit b2cde7665a
4 changed files with 17 additions and 3 deletions

View File

@@ -213,8 +213,14 @@ void asst::OcrImageAnalyzer::sort_result_by_required()
m_req_cache.emplace(m_required.at(i), i + 1);
}
// 不在 m_required 中的将被排在最后
std::sort(get_result().begin(), get_result().end(),
[&m_req_cache](const auto& lhs, const auto& rhs) -> bool {
return m_req_cache[lhs.text] < m_req_cache[rhs.text];
size_t lvalue = m_req_cache[lhs.text];
size_t rvalue = m_req_cache[rhs.text];
if (lvalue == 0) {
return false;
}
return lvalue < rvalue;
});
}