From 201d6f132e8159aa97214da2d7ea031b314aaf8c Mon Sep 17 00:00:00 2001 From: alphanin9 <47785076+alphanin9@users.noreply.github.com> Date: Sat, 25 Jan 2025 00:19:54 +0200 Subject: [PATCH] fix: Linker error with static - Note: enable global optimization again sometime later... --- src/redscript_api/NewGamePlusSystem.cpp | 4 +++- src/redscript_api/NewGamePlusSystem.hpp | 3 +-- xmake.lua | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/redscript_api/NewGamePlusSystem.cpp b/src/redscript_api/NewGamePlusSystem.cpp index 5454e30..e1d7738 100644 --- a/src/redscript_api/NewGamePlusSystem.cpp +++ b/src/redscript_api/NewGamePlusSystem.cpp @@ -1,3 +1,6 @@ +#include +#include + #include #include @@ -450,7 +453,6 @@ void mod::NewGamePlusSystem::OnGamePrepared() m_modConfig = settings::GetModSettings(); } - // If we haven't restored, update NG+ config if (!m_restoredDataFromSave) { diff --git a/src/redscript_api/NewGamePlusSystem.hpp b/src/redscript_api/NewGamePlusSystem.hpp index ff9bcf1..c778ae9 100644 --- a/src/redscript_api/NewGamePlusSystem.hpp +++ b/src/redscript_api/NewGamePlusSystem.hpp @@ -71,7 +71,7 @@ class NewGamePlusSystem : public Red::IGameSystem #pragma region Statics // Note: Game systems are kept indefinitely, we can cache thisptr from OnInitialize here - static NewGamePlusSystem* s_this; + static inline NewGamePlusSystem* s_this; #pragma endregion public: #pragma region API @@ -106,7 +106,6 @@ class NewGamePlusSystem : public Red::IGameSystem void RequestResolveNewGamePlusSaves(Red::DynArray aSaves, Red::WeakHandle aRef, Red::CName aCallbackName); - void RequestLoadSaveData(Red::CString aSaveName, Red::WeakHandle aTarget, Red::CName aCallbackName); void Spew(Red::ScriptRef& aStr); diff --git a/xmake.lua b/xmake.lua index a1e8e7a..bff46c2 100644 --- a/xmake.lua +++ b/xmake.lua @@ -9,7 +9,7 @@ add_cxxflags("/MP /GR- /EHsc") set_symbols("debug") set_strip("all") set_optimize("fastest") -add_cxxflags("/Zi /Ob2 /Oi /GL") +add_cxxflags("/Zi /Ob2 /Oi") set_runtimes("MD") add_requires("lz4", "hopscotch-map", "semver", "wil")