From 6c9ff78221909b8e4e9d0ae317d02b7fdcad45de Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 19:59:43 +0000 Subject: [PATCH] Decompile fn_06430 (CJobCodeForItem::AddJobCode) Batch #13534 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_06430 CJobCodeForItem::AddJobCode: 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). --- Source/Contents/JobCodeForItem.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Source/Contents/JobCodeForItem.cpp b/Source/Contents/JobCodeForItem.cpp index c3c7323ba..7fde763bb 100644 --- a/Source/Contents/JobCodeForItem.cpp +++ b/Source/Contents/JobCodeForItem.cpp @@ -69,13 +69,14 @@ template void CJobCodeForItem::AddJobCodeFromGroups(unsigned long, int); template void CJobCodeForItem::AddJobCode(unsigned long code, Jobs... jobs) { std::set 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); } }