Skip to content

Commit

Permalink
these should be const
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool authored Nov 4, 2024
1 parent 91f9936 commit 0db215d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mods/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -615,14 +615,14 @@ struct matjson::Serialize<MyComplexSettingValue> {
// Deserialize the value from JSON, again taking advantage of strings being inherently
// JSON-serializable
static MyComplexSettingValue from_json(matjson::Value& json) {
static MyComplexSettingValue from_json(matjson::Value const& json) {
return MyComplexSettingValue(json.as_string());
}
// Validate that the JSON value is the type we expect. You can do more complex validation here,
// but in practice most implementations just check if it's roughly the correct type (usually
// object, array, or string)
static bool is_json(matjson::Value& json) {
static bool is_json(matjson::Value const& json) {
return json.is_string();
}
};
Expand Down

0 comments on commit 0db215d

Please sign in to comment.