From bd79f275cc4b091cd6640e46c9cb12f57c1bdb64 Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Tue, 13 Dec 2022 23:50:19 +0200 Subject: [PATCH] fix mac build --- loader/src/loader/Event.cpp | 2 +- loader/src/loader/Setting.cpp | 34 ++++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/loader/src/loader/Event.cpp b/loader/src/loader/Event.cpp index 4a59bec8..87c97e3b 100644 --- a/loader/src/loader/Event.cpp +++ b/loader/src/loader/Event.cpp @@ -29,4 +29,4 @@ void Event::postFrom(Mod* m) { std::unordered_set& Event::listeners() { static std::unordered_set listeners; return listeners; -} \ No newline at end of file +} diff --git a/loader/src/loader/Setting.cpp b/loader/src/loader/Setting.cpp index d8e518c7..bb7b9ce5 100644 --- a/loader/src/loader/Setting.cpp +++ b/loader/src/loader/Setting.cpp @@ -222,6 +222,7 @@ std::string SettingValue::getKey() const { >::createNode(float width) { \ return type_##SettingNode::create(this, width); \ } \ + template<> \ typename type_##Setting::ValueType SettingValueSetter< \ typename type_##Setting::ValueType \ >::get(SettingValue* setting) { \ @@ -230,6 +231,7 @@ std::string SettingValue::getKey() const { } \ return typename type_##Setting::ValueType(); \ } \ + template<> \ void SettingValueSetter< \ typename type_##Setting::ValueType \ >::set( \ @@ -250,23 +252,27 @@ std::string SettingValue::getKey() const { // instantiate value setters -template struct SettingValueSetter; -template struct SettingValueSetter; -template struct SettingValueSetter; -template struct SettingValueSetter; -template struct SettingValueSetter; -template struct SettingValueSetter; -template struct SettingValueSetter; +namespace geode { + template struct SettingValueSetter; + template struct SettingValueSetter; + template struct SettingValueSetter; + template struct SettingValueSetter; + template struct SettingValueSetter; + template struct SettingValueSetter; + template struct SettingValueSetter; +} // instantiate values -template class GeodeSettingValue; -template class GeodeSettingValue; -template class GeodeSettingValue; -template class GeodeSettingValue; -template class GeodeSettingValue; -template class GeodeSettingValue; -template class GeodeSettingValue; +namespace geode { + template class GeodeSettingValue; + template class GeodeSettingValue; + template class GeodeSettingValue; + template class GeodeSettingValue; + template class GeodeSettingValue; + template class GeodeSettingValue; + template class GeodeSettingValue; +} IMPL_NODE_AND_SETTERS(Bool); IMPL_NODE_AND_SETTERS(Int);