From da4168ff6b79ef2da7d5158bedda44d2f4433035 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 03:02:31 +0000 Subject: [PATCH] Decompile fn_12415 (UIFrameWnd::DrawItemNameText) Batch #11719 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_12415 UIFrameWnd::DrawItemNameText: logic confirmed by peer review Peer-reviewed-by: Tanke, dori, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Acceptance/UIChooseSellBuyWnd.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index d8685ff3..e9ce0ad1 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -12123,7 +12123,10 @@ void UIFrameWnd::DrawItemNameText( length = static_cast(next - lineStart); measured = this->TextWidth(begin, length, 0, 12, 0, 0); if (measured + lineWidth > width) { - line->push_back(std::make_pair(segment->first, segment->second.substr(offset, length))); + std::pair piece; + piece.second = segment->second.substr(offset, length); + piece.first = segment->first; + line->push_back(piece); ++line; ++lineCount; lineStart = next; @@ -12137,7 +12140,10 @@ void UIFrameWnd::DrawItemNameText( break; } if (next >= end) { - line->push_back(std::make_pair(segment->first, segment->second.substr(offset, length))); + std::pair piece; + piece.second = segment->second.substr(offset, length); + piece.first = segment->first; + line->push_back(piece); } } @@ -12147,15 +12153,7 @@ void UIFrameWnd::DrawItemNameText( { FrameTextKey key{color, static_cast(width), std::string(text, std::strlen(text))}; - FrameTextLines& stored = this->m_textCache[std::move(key)]; - if (&stored != &lines) { - for (const auto& source : lines) { - stored.emplace_back(); - for (const auto& piece : source) { - stored.back().emplace_back(piece.first, std::string(piece.second.c_str(), piece.second.size())); - } - } - } + this->m_textCache[std::move(key)] = lines; } this->DrawTextLines(position->x, position->y, position->family, position->height, lines); }