File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -466,22 +466,20 @@ recomp::mods::ModOpenError parse_manifest_config_schema_option(const nlohmann::j
466466
467467 auto precision = config_schema_json.find (config_schema_precision_key);
468468 if (precision != config_schema_json.end ()) {
469- int64_t precision_int64;
470- if (get_to<int64_t >(*precision, precision_int64)) {
471- option_number.precision = precision_int64;
472- }
473- else {
469+ if (!precision->is_number ()) {
474470 error_param = config_schema_precision_key;
475471 return recomp::mods::ModOpenError::IncorrectConfigSchemaType;
476472 }
473+ option_number.precision = precision->template get <int64_t >();
477474 }
478475
479476 auto percent = config_schema_json.find (config_schema_percent_key);
480477 if (percent != config_schema_json.end ()) {
481- if (!get_to< bool >(*percent, option_number. percent )) {
478+ if (!percent-> is_boolean ( )) {
482479 error_param = config_schema_percent_key;
483480 return recomp::mods::ModOpenError::IncorrectConfigSchemaType;
484481 }
482+ option_number.percent = percent->template get <bool >();
485483 }
486484
487485 auto default_value = config_schema_json.find (config_schema_default_key);
You can’t perform that action at this time.
0 commit comments