diff --git a/loader/include/Geode/loader/Loader.hpp b/loader/include/Geode/loader/Loader.hpp index 62c9f70b..cdb1ddb7 100644 --- a/loader/include/Geode/loader/Loader.hpp +++ b/loader/include/Geode/loader/Loader.hpp @@ -121,7 +121,7 @@ namespace geode { * @param name The argument name */ template - Result parseLaunchArgument(std::string_view const name) const { + Result parseLaunchArgument(std::string_view const name) const { auto str = this->getLaunchArgument(name); if (!str.has_value()) { return Err("Launch argument '{}' not found", name); diff --git a/loader/include/Geode/utils/cocos.hpp b/loader/include/Geode/utils/cocos.hpp index e2337aef..43668bec 100644 --- a/loader/include/Geode/utils/cocos.hpp +++ b/loader/include/Geode/utils/cocos.hpp @@ -15,14 +15,14 @@ template <> struct matjson::Serialize { - static geode::Result fromJson(Value const& value); - static Value toJson(cocos2d::ccColor3B const& value); + static geode::Result GEODE_DLL fromJson(Value const& value); + static Value GEODE_DLL toJson(cocos2d::ccColor3B const& value); }; template <> struct matjson::Serialize { - static geode::Result fromJson(Value const& value); - static Value toJson(cocos2d::ccColor4B const& value); + static geode::Result GEODE_DLL fromJson(Value const& value); + static Value GEODE_DLL toJson(cocos2d::ccColor4B const& value); }; // operators for CC geometry @@ -930,10 +930,10 @@ namespace std { }; template - struct std::hash> { + struct hash> { size_t operator()(geode::WeakRef const& ref) const { // the explicit template argument is needed here because it would otherwise cast to WeakRef and recurse - return hash>{}(ref.m_controller); + return std::hash>{}(ref.m_controller); } }; } diff --git a/loader/include/Geode/utils/file.hpp b/loader/include/Geode/utils/file.hpp index 3cc7f7c5..b037512f 100644 --- a/loader/include/Geode/utils/file.hpp +++ b/loader/include/Geode/utils/file.hpp @@ -41,7 +41,8 @@ namespace geode::utils::file { template Result<> writeToJson(std::filesystem::path const& path, T const& data) { - GEODE_UNWRAP(writeString(path, matjson::Value(data).dump())); + GEODE_UNWRAP_INTO(auto str, matjson::Value(data).dump()); + GEODE_UNWRAP(writeString(path, str)); return Ok(); }