From f550db3de317f1a385bc637e805a6a5c9b3a1d57 Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:02:17 -0300 Subject: [PATCH] update settings example for v4 --- mods/settings.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/settings.md b/mods/settings.md index 3366825..b0238e8 100644 --- a/mods/settings.md +++ b/mods/settings.md @@ -419,7 +419,7 @@ public: // from its definition in `mod.json`. The signature must match this exactly, // although the return type should point to a `SettingV3`-derivative rather // than `std::shared_ptr` directly - static Result> parse( + static Result> parse( // The key of the setting, as defined in `mod.json` std::string const& key, // The mod ID this setting is being parsed for @@ -456,7 +456,7 @@ public: root.checkUnknownKeys(); // Return the resulting instance, or an Err if the JSON parsing failed - return root.ok(res); + return root.ok(std::static_pointer_cast(res)); } // This is defined at the end of the file, as it needs to know the