pruned early comments

This commit is contained in:
2026-09-07 20:07:13 -04:00
parent abf065ddde
commit 0493a7c451

View File

@@ -25,17 +25,6 @@ namespace PalUIExtension
std::vector<std::unique_ptr<Features::IUIFeature>> m_features{};
bool m_installed = false;
// The static back-reference exists because UE4SS hook callbacks
// for FUNCTIONS take a void* CustomData but the ENGINE-level
// callbacks (LoadMap) do not -- they take a std::function with no
// user data slot. A capturing lambda would work for the latter,
// but then the two teardown paths would reach the mod by two
// different mechanisms, and a reader would have to work out
// whether that difference meant anything. It does not. One
// pointer, one mechanism.
//
// Single-instance is a safe assumption here: UE4SS constructs
// exactly one CppUserModBase per mod DLL via start_mod().
inline static PalUIExtension* s_instance{ nullptr };
public:
@@ -51,8 +40,7 @@ namespace PalUIExtension
~PalUIExtension() override
{
// Order matters: hooks first, so nothing can fire a callback
// into features that are about to be destroyed.
// Order matters: hooks first, so nothing can fire a callback into features that are about to be destroyed.
Static::EventHookRegistry::Cleanup();
m_features.clear();
@@ -65,8 +53,6 @@ namespace PalUIExtension
BuildFeatures();
// +2 for the game-mode hooks below, which go through the same
// registry and would otherwise force a reallocation.
Static::EventHookRegistry::Initialize(m_features.size() * 4 + 2);
for (auto& Feature : m_features)