mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-06 16:09:30 +00:00
LibJS: Remove redundant use of JsonValue::{is,as}_i32()
Value::Value(double) already converts double to int when it is safe, no need to check for this here explicitly. While this technically removes an optimization, I doubt that it will regress performance in any measurable way.
This commit is contained in:
parent
b74df136fe
commit
77f36a9e46
|
@ -434,8 +434,6 @@ Value JSONObject::parse_json_value(VM& vm, JsonValue const& value)
|
|||
return Value(parse_json_array(vm, value.as_array()));
|
||||
if (value.is_null())
|
||||
return js_null();
|
||||
if (value.is_i32())
|
||||
return Value(value.as_i32());
|
||||
if (value.is_number())
|
||||
return Value(value.to_double(0));
|
||||
if (value.is_string())
|
||||
|
|
Loading…
Reference in a new issue