mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:45:06 +00:00
AK+GMLCompiler+LibWeb: Remove JsonValue::is_double
This concludes a series of patches which remove the ability to observe which arithmetic type is used to store number in JsonValue.
This commit is contained in:
parent
faef802229
commit
c49819cced
5 changed files with 6 additions and 21 deletions
|
@ -764,11 +764,11 @@ size_t property_maximum_value_count(PropertyID property_id)
|
|||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (value.as_object().has("max-values"sv)) {
|
||||
auto max_values = value.as_object().get("max-values"sv);
|
||||
VERIFY(max_values.has_value() && max_values->is_number() && !max_values->is_double());
|
||||
JsonValue max_values = value.as_object().get("max-values"sv).release_value();
|
||||
VERIFY(max_values.is_integer<size_t>());
|
||||
auto property_generator = generator.fork();
|
||||
property_generator.set("name:titlecase", title_casify(name));
|
||||
property_generator.set("max_values", max_values->template serialized<StringBuilder>());
|
||||
property_generator.set("max_values", MUST(String::formatted("{}", max_values.as_integer<size_t>())));
|
||||
property_generator.append(R"~~~(
|
||||
case PropertyID::@name:titlecase@:
|
||||
return @max_values@;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue