File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 2121
2222## Changes to the Geode Settings API
2323* Settings v2 has been removed, V3 suffix from classes are now aliased
24- * Code that already used SettingsV3 should still work
24+ * Most SettingV3 code should work fine, with the exception of some Result usages:
25+ ``` cpp
26+ static Result<std::shared_ptr<MyCustomSettingV3>> parse (std::string const&, std::string const&, matjson::Value const& json) {
27+ auto res = std::make_shared<MyCustomSettingV3 >();
28+ auto root = checkJson(json, "MyCustomSettingV3");
29+ // ... some code here ...
30+ return root.ok(res);
31+ }
32+ // should now be:
33+ // ↓ here
34+ static Result< std::shared_ptr<SettingV3 > > parse(std::string const&, std::string const&, matjson::Value const& json) {
35+ auto res = std::make_shared<MyCustomSettingV3 >();
36+ auto root = checkJson(json, "MyCustomSettingV3");
37+ // ... some code here ...
38+ // ↓ here
39+ return root.ok(std::static_pointer_cast<SettingV3 >(res));
40+ }
41+ ```
42+
43+ ## Changes to `utils::MiniFunction`
44+ * Removed, use `std::function` now
2545
2646## Changes to `geode::Layout`
2747* No longer in cocos2d namespace
You can’t perform that action at this time.
0 commit comments