From 87ff4b2ae49028c88bdc86eae9d6ecd0797f1959 Mon Sep 17 00:00:00 2001 From: John Magdy Lotfy Kamel <19735243+Zorono@users.noreply.github.com> Date: Sat, 25 Apr 2026 03:01:31 +0000 Subject: [PATCH 1/3] Change all_ to static inline initialization --- NativeFunc.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NativeFunc.hpp b/NativeFunc.hpp index b278325..02bb7e7 100644 --- a/NativeFunc.hpp +++ b/NativeFunc.hpp @@ -115,8 +115,8 @@ class NativeFuncBase cell* params_; - static std::list* - all_; + static inline std::list* + all_ = nullptr; }; template From 109eb8a3b6bf83cce974ece9e6f29f7e3c3e8927 Mon Sep 17 00:00:00 2001 From: John Magdy Lotfy Kamel <19735243+Zorono@users.noreply.github.com> Date: Sat, 25 Apr 2026 03:02:44 +0000 Subject: [PATCH 2/3] Refactor AmxLoad and remove unused NativeFuncBase Removed unused declaration of NativeFuncBase::all_ and made AmxLoad inline. --- NativesMain.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/NativesMain.hpp b/NativesMain.hpp index 3f744f5..4b861b4 100644 --- a/NativesMain.hpp +++ b/NativesMain.hpp @@ -5,12 +5,9 @@ namespace pawn_natives { #ifdef PAWN_NATIVES_HAS_FUNC -std::list* - NativeFuncBase::all_ - = 0; #endif -int AmxLoad(AMX* amx) +inline int AmxLoad(AMX* amx) { int ret From c1451b8591be27f69fd45b83bad427a87bb22e3f Mon Sep 17 00:00:00 2001 From: John Magdy Lotfy Kamel <19735243+Zorono@users.noreply.github.com> Date: Sat, 25 Apr 2026 03:04:04 +0000 Subject: [PATCH 3/3] Remove unused preprocessor directives in NativesMain.hpp --- NativesMain.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/NativesMain.hpp b/NativesMain.hpp index 4b861b4..75f1cb6 100644 --- a/NativesMain.hpp +++ b/NativesMain.hpp @@ -4,8 +4,6 @@ namespace pawn_natives { -#ifdef PAWN_NATIVES_HAS_FUNC -#endif inline int AmxLoad(AMX* amx) {