File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -451,22 +451,20 @@ recomp::mods::ModOpenError parse_manifest_config_schema_option(const nlohmann::j
451451
452452 auto precision = config_schema_json.find (config_schema_precision_key);
453453 if (precision != config_schema_json.end ()) {
454- int64_t precision_int64;
455- if (get_to<int64_t >(*precision, precision_int64)) {
456- option_number.precision = precision_int64;
457- }
458- else {
454+ if (!precision->is_number ()) {
459455 error_param = config_schema_precision_key;
460456 return recomp::mods::ModOpenError::IncorrectConfigSchemaType;
461457 }
458+ option_number.precision = precision->template get <int64_t >();
462459 }
463460
464461 auto percent = config_schema_json.find (config_schema_percent_key);
465462 if (percent != config_schema_json.end ()) {
466- if (!get_to< bool >(*percent, option_number. percent )) {
463+ if (!percent-> is_boolean ( )) {
467464 error_param = config_schema_percent_key;
468465 return recomp::mods::ModOpenError::IncorrectConfigSchemaType;
469466 }
467+ option_number.percent = percent->template get <bool >();
470468 }
471469
472470 auto default_value = config_schema_json.find (config_schema_default_key);
You can’t perform that action at this time.
0 commit comments