1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:57:44 +00:00

LibWeb: Use floats instead of doubles for CSS numbers

Using doubles isn't necessary, and they make things slightly bigger and
slower, so let's use floats instead.
This commit is contained in:
Sam Atkins 2022-03-21 17:22:05 +00:00 committed by Andreas Kling
parent 1f5b5d3f99
commit 0795b9f7bb
6 changed files with 33 additions and 33 deletions

View file

@ -60,7 +60,7 @@ public:
class CSSNumber {
public:
String string;
double value { 0 };
float value { 0 };
Token::NumberType type {};
};
@ -90,7 +90,7 @@ private:
[[nodiscard]] Token consume_a_numeric_token();
[[nodiscard]] Token consume_an_ident_like_token();
[[nodiscard]] CSSNumber consume_a_number();
[[nodiscard]] double convert_a_string_to_a_number(StringView);
[[nodiscard]] float convert_a_string_to_a_number(StringView);
[[nodiscard]] String consume_a_name();
[[nodiscard]] u32 consume_escaped_code_point();
[[nodiscard]] Token consume_a_url_token();