mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
AK+Applications: Return value from JsonObject::get_double more often
Previously, we were returning an empty optional if key contained a numerical value which was not stored as double. Stop doing that and rename the method to signify the change in the behavior. Apparently, this fixes bug in an InspectorWidget in Ladybird on Serenity: it showed 0 for element's boxes with integer sizes.
This commit is contained in:
parent
7cdd07b89a
commit
80d1c93edf
Notes:
sideshowbarker
2024-07-17 10:54:57 +09:00
Author: https://github.com/DanShaders
Commit: 80d1c93edf
Pull-request: https://github.com/SerenityOS/serenity/pull/21941
4 changed files with 24 additions and 24 deletions
|
@ -85,8 +85,8 @@ public:
|
|||
Optional<JsonArray const&> get_array(StringView key) const;
|
||||
|
||||
#if !defined(KERNEL)
|
||||
Optional<double> get_double(StringView key) const;
|
||||
Optional<float> get_float(StringView key) const;
|
||||
Optional<double> get_double_with_precision_loss(StringView key) const;
|
||||
Optional<float> get_float_with_precision_loss(StringView key) const;
|
||||
#endif
|
||||
|
||||
void set(DeprecatedString const& key, JsonValue value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue