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:
parent
bf741ec8b6
commit
6c9ff78221
1 changed files with 8 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue