From 5bd22f501c22f0ebec6dd5f86f9fc89fbebbd05e Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 04:13:39 +0000 Subject: [PATCH] Decompile fn_13882 (ExtractTextTags) Batch #11667 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_13882 ExtractTextTags: logic confirmed by peer review Peer-reviewed-by: Yommy, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/TextTagExtraction.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/UI/TextTagExtraction.cpp b/Source/UI/TextTagExtraction.cpp index 7b06b09b..6d72093f 100644 --- a/Source/UI/TextTagExtraction.cpp +++ b/Source/UI/TextTagExtraction.cpp @@ -6,24 +6,24 @@ std::vector ExtractTextTags(std::string text) { std::vector tags; int index = 0; - for (const CTagPrototype& prototype : g_textTagRegistry) { + for (auto prototype = g_textTagRegistry.begin(); prototype != g_textTagRegistry.end(); ++prototype) { std::string remaining = text; for (std::size_t offset = 0; offset < text.size();) { - const std::size_t begin = remaining.find(prototype.opening); + const std::size_t begin = remaining.find(prototype->opening); if (begin == std::string::npos) { break; } - std::size_t end = remaining.find(prototype.closing); + std::size_t end = remaining.find(prototype->closing); std::size_t advance; if (end == std::string::npos) { - advance = prototype.opening.size(); + advance = prototype->opening.size(); remaining.erase(0, advance); } else { - end += prototype.closing.size(); + end += prototype->closing.size(); STagString tag(index, offset + begin, remaining.substr(begin, end - begin)); tags.push_back(tag); remaining.erase(0, end);