From 2b473feb2456e754c446de170cbea55d169af5dc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 10:18:14 +0000 Subject: [PATCH] Maintenance: Move the extern template declaration of std::_Traits_compare> from 18 units into Source/Utility/StdStr Batch #15807 by ragnarok-clanker: no function's compiled code changes; checked with 18 compiled unit(s), including every includer of Source/Utility/StdStringCompare.h. --- Source/ActorPickNode.cpp | 3 +-- Source/Client/Mode/GameMode.cpp | 3 +-- Source/Client/Session.cpp | 3 +-- Source/Client/SessionAchievements.cpp | 3 +-- Source/Contents/ClientTiming.cpp | 2 +- Source/Contents/EffectResourceSwitcher.cpp | 3 +-- Source/Contents/Items/ItemInfo.cpp | 3 +-- Source/Contents/Messenger/ClientMessenger.cpp | 3 +-- Source/Contents/Messenger/WhisperBlockMgr.cpp | 3 +-- Source/Contents/Models/ModelLighting.cpp | 3 +-- Source/Contents/Movies/BinkMovies.cpp | 3 +-- Source/Contents/PrivateAirplaneMgr.cpp | 3 +-- Source/Contents/TownInfoMgr.cpp | 3 +-- Source/Render/Primitives/ScreenLine.cpp | 3 +-- Source/Resource/ResourceFailures.cpp | 3 +-- Source/UI/CashShop/UICashShopWnd.cpp | 3 +-- Source/UI/EntryQueue/UIEntryQueueWnd.cpp | 3 +-- Source/UI/Item/UIMerchantItemLogWnd.cpp | 3 +-- Source/Utility/StdStringCompare.h | 6 ++++++ 19 files changed, 24 insertions(+), 35 deletions(-) create mode 100644 Source/Utility/StdStringCompare.h diff --git a/Source/ActorPickNode.cpp b/Source/ActorPickNode.cpp index 4e7a81585..2c81bf004 100644 --- a/Source/ActorPickNode.cpp +++ b/Source/ActorPickNode.cpp @@ -14,8 +14,7 @@ #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" // OFFSET: 0x00AD9530 // FUNCTION: fn_17878 diff --git a/Source/Client/Mode/GameMode.cpp b/Source/Client/Mode/GameMode.cpp index fb5a53879..3315f9034 100644 --- a/Source/Client/Mode/GameMode.cpp +++ b/Source/Client/Mode/GameMode.cpp @@ -9128,8 +9128,7 @@ void CGameMode::UpdateHoverNameBalloon() { #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" #pragma pack(push, 1) struct TalkWhisperSettingPacket { diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index 92ec39524..b7a7d0615 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -74,8 +74,7 @@ #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" // STATIC: 0x01732638 // GLOBAL: gl_24474 diff --git a/Source/Client/SessionAchievements.cpp b/Source/Client/SessionAchievements.cpp index cf945849b..11fc73398 100644 --- a/Source/Client/SessionAchievements.cpp +++ b/Source/Client/SessionAchievements.cpp @@ -12,8 +12,7 @@ #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" struct JobTitleLess { bool operator()(int left, int right) const; diff --git a/Source/Contents/ClientTiming.cpp b/Source/Contents/ClientTiming.cpp index 697ccf88e..6da3287a2 100644 --- a/Source/Contents/ClientTiming.cpp +++ b/Source/Contents/ClientTiming.cpp @@ -22,8 +22,8 @@ #include #include #include +#include "Utility/StdStringCompare.h" -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; extern template bool std::_Traits_equal>(const char*, std::size_t, const char*, std::size_t) noexcept; // GLOBAL: gl_24705 diff --git a/Source/Contents/EffectResourceSwitcher.cpp b/Source/Contents/EffectResourceSwitcher.cpp index 4ffd7f18d..094d2ba87 100644 --- a/Source/Contents/EffectResourceSwitcher.cpp +++ b/Source/Contents/EffectResourceSwitcher.cpp @@ -20,8 +20,7 @@ #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" // GLOBAL: gl_24485 template <> diff --git a/Source/Contents/Items/ItemInfo.cpp b/Source/Contents/Items/ItemInfo.cpp index 5ba3cc442..979c388e7 100644 --- a/Source/Contents/Items/ItemInfo.cpp +++ b/Source/Contents/Items/ItemInfo.cpp @@ -13,8 +13,7 @@ #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" namespace { #pragma pack(push, 1) diff --git a/Source/Contents/Messenger/ClientMessenger.cpp b/Source/Contents/Messenger/ClientMessenger.cpp index 99402b677..904e9432c 100644 --- a/Source/Contents/Messenger/ClientMessenger.cpp +++ b/Source/Contents/Messenger/ClientMessenger.cpp @@ -59,9 +59,8 @@ extern "C" { #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; } +#include "Utility/StdStringCompare.h" void __fastcall RefreshItemWindows(UIWindowMgr* mgr); diff --git a/Source/Contents/Messenger/WhisperBlockMgr.cpp b/Source/Contents/Messenger/WhisperBlockMgr.cpp index b18ed1b6f..e3df0d2e7 100644 --- a/Source/Contents/Messenger/WhisperBlockMgr.cpp +++ b/Source/Contents/Messenger/WhisperBlockMgr.cpp @@ -2,8 +2,7 @@ #include "Network/TextEncoding.h" #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" // STATIC: 0x01389940 // GLOBAL: gl_24357 diff --git a/Source/Contents/Models/ModelLighting.cpp b/Source/Contents/Models/ModelLighting.cpp index b6648b28b..ab5f6d9fe 100644 --- a/Source/Contents/Models/ModelLighting.cpp +++ b/Source/Contents/Models/ModelLighting.cpp @@ -10,8 +10,7 @@ #include "Utility/Math/ScalarConversion.h" #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" union ModelColor { std::uint32_t value; diff --git a/Source/Contents/Movies/BinkMovies.cpp b/Source/Contents/Movies/BinkMovies.cpp index c8ddd5247..4ed6479c6 100644 --- a/Source/Contents/Movies/BinkMovies.cpp +++ b/Source/Contents/Movies/BinkMovies.cpp @@ -11,8 +11,7 @@ #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" // INLINED NamedBinkMovie::NamedBinkMovie() : radius(150.0f) { diff --git a/Source/Contents/PrivateAirplaneMgr.cpp b/Source/Contents/PrivateAirplaneMgr.cpp index d831ea86a..9e04bec60 100644 --- a/Source/Contents/PrivateAirplaneMgr.cpp +++ b/Source/Contents/PrivateAirplaneMgr.cpp @@ -10,9 +10,8 @@ extern "C" { #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; } +#include "Utility/StdStringCompare.h" // GLOBAL: gl_24636 CPrivateAirplaneMgr* g_privateAirplaneItems; diff --git a/Source/Contents/TownInfoMgr.cpp b/Source/Contents/TownInfoMgr.cpp index 60da998e8..88de54346 100644 --- a/Source/Contents/TownInfoMgr.cpp +++ b/Source/Contents/TownInfoMgr.cpp @@ -14,8 +14,7 @@ extern "C" { #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" // GLOBAL: gl_24817 CTownInfoMgr* g_townInfoMgr; diff --git a/Source/Render/Primitives/ScreenLine.cpp b/Source/Render/Primitives/ScreenLine.cpp index e153c0db8..e9e09b4c5 100644 --- a/Source/Render/Primitives/ScreenLine.cpp +++ b/Source/Render/Primitives/ScreenLine.cpp @@ -30,8 +30,7 @@ #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" namespace { __declspec(noinline) float ScreenLineSine(float angle) { diff --git a/Source/Resource/ResourceFailures.cpp b/Source/Resource/ResourceFailures.cpp index 3f90dc332..f966facf0 100644 --- a/Source/Resource/ResourceFailures.cpp +++ b/Source/Resource/ResourceFailures.cpp @@ -5,8 +5,7 @@ #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" // GLOBAL: gl_24582 ResourceFailures g_resourceFailures; diff --git a/Source/UI/CashShop/UICashShopWnd.cpp b/Source/UI/CashShop/UICashShopWnd.cpp index 3233e8a4c..88ae1201f 100644 --- a/Source/UI/CashShop/UICashShopWnd.cpp +++ b/Source/UI/CashShop/UICashShopWnd.cpp @@ -48,8 +48,7 @@ #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" #pragma pack(push, 1) diff --git a/Source/UI/EntryQueue/UIEntryQueueWnd.cpp b/Source/UI/EntryQueue/UIEntryQueueWnd.cpp index 199220306..4670fe7c9 100644 --- a/Source/UI/EntryQueue/UIEntryQueueWnd.cpp +++ b/Source/UI/EntryQueue/UIEntryQueueWnd.cpp @@ -30,8 +30,7 @@ #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" // OFFSET: 0x00BA3920 // FUNCTION: fn_19677 diff --git a/Source/UI/Item/UIMerchantItemLogWnd.cpp b/Source/UI/Item/UIMerchantItemLogWnd.cpp index 05ebd8148..92ef75407 100644 --- a/Source/UI/Item/UIMerchantItemLogWnd.cpp +++ b/Source/UI/Item/UIMerchantItemLogWnd.cpp @@ -30,8 +30,7 @@ #include #include #include - -extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept; +#include "Utility/StdStringCompare.h" // OFFSET: 0x0099E0E0 // FUNCTION: fn_13571 diff --git a/Source/Utility/StdStringCompare.h b/Source/Utility/StdStringCompare.h new file mode 100644 index 000000000..1f7b87f5c --- /dev/null +++ b/Source/Utility/StdStringCompare.h @@ -0,0 +1,6 @@ +#pragma once + +#include +#include + +extern template int std::_Traits_compare>(const char*, std::size_t, const char*, std::size_t) noexcept;