Skip to content

Commit f550db3

Browse files
authored
update settings example for v4
1 parent d83d62b commit f550db3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mods/settings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ public:
419419
// from its definition in `mod.json`. The signature must match this exactly,
420420
// although the return type should point to a `SettingV3`-derivative rather
421421
// than `std::shared_ptr<SettingV3>` directly
422-
static Result<std::shared_ptr<MyCustomSettingV3>> parse(
422+
static Result<std::shared_ptr<SettingV3>> parse(
423423
// The key of the setting, as defined in `mod.json`
424424
std::string const& key,
425425
// The mod ID this setting is being parsed for
@@ -456,7 +456,7 @@ public:
456456
root.checkUnknownKeys();
457457

458458
// Return the resulting instance, or an Err if the JSON parsing failed
459-
return root.ok(res);
459+
return root.ok(std::static_pointer_cast<SettingV3>(res));
460460
}
461461

462462
// This is defined at the end of the file, as it needs to know the

0 commit comments

Comments
 (0)