Decompile fn_06430 (CJobCodeForItem::AddJobCode<JobId,JobId>)

Batch #13534 by cremane: 0 byte-identical, 1 confirmed by peer review.

- fn_06430 CJobCodeForItem::AddJobCode<JobId,JobId>: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, codeplay, spider
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-06 19:59:43 +00:00
commit 6c9ff78221

View file

@ -69,13 +69,14 @@ template void CJobCodeForItem::AddJobCodeFromGroups(unsigned long, int);
template <typename... Jobs>
void CJobCodeForItem::AddJobCode(unsigned long code, Jobs... jobs) {
std::set<int> jobSet = {jobs...};
if (!jobSet.empty()) {
auto it = this->m_jobCodes.find(code);
if (it == this->m_jobCodes.end()) {
this->m_jobCodes[code] = jobSet;
} else {
it->second.merge(jobSet);
}
if (jobSet.empty()) {
return;
}
auto it = this->m_jobCodes.find(code);
if (this->m_jobCodes.end() == it) {
this->m_jobCodes[code] = jobSet;
} else {
it->second.merge(jobSet);
}
}