summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2023-05-02 22:39:07 +0100
committerAndreas Kling <kling@serenityos.org>2023-05-04 16:50:01 +0200
commit3d54b9ffa34b4297544558f71d04739c17af8291 (patch)
tree54c550c88aa3205abd18386d950df6556192676c /Userland
parentcf0e31ca875a0dbdeec15eb166a921b9f5bcb047 (diff)
downloadserenity-3d54b9ffa34b4297544558f71d04739c17af8291.zip
LibWeb: Mark SVG::NumberPercentage accessors as const
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/SVG/AttributeParser.cpp2
-rw-r--r--Userland/Libraries/LibWeb/SVG/AttributeParser.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/AttributeParser.cpp b/Userland/Libraries/LibWeb/SVG/AttributeParser.cpp
index 826e4a9d51..9649eb38e7 100644
--- a/Userland/Libraries/LibWeb/SVG/AttributeParser.cpp
+++ b/Userland/Libraries/LibWeb/SVG/AttributeParser.cpp
@@ -66,7 +66,7 @@ Optional<float> AttributeParser::parse_length(StringView input)
return {};
}
-float NumberPercentage::resolve_relative_to(float length)
+float NumberPercentage::resolve_relative_to(float length) const
{
if (!m_is_percentage)
return m_value;
diff --git a/Userland/Libraries/LibWeb/SVG/AttributeParser.h b/Userland/Libraries/LibWeb/SVG/AttributeParser.h
index 1e7578cdb2..2fee747f69 100644
--- a/Userland/Libraries/LibWeb/SVG/AttributeParser.h
+++ b/Userland/Libraries/LibWeb/SVG/AttributeParser.h
@@ -111,9 +111,9 @@ public:
return NumberPercentage(value, false);
}
- float resolve_relative_to(float length);
+ float resolve_relative_to(float length) const;
- float value() { return m_value; }
+ float value() const { return m_value; }
private:
float m_value;