From 3d54b9ffa34b4297544558f71d04739c17af8291 Mon Sep 17 00:00:00 2001 From: MacDue Date: Tue, 2 May 2023 22:39:07 +0100 Subject: LibWeb: Mark SVG::NumberPercentage accessors as const --- Userland/Libraries/LibWeb/SVG/AttributeParser.cpp | 2 +- Userland/Libraries/LibWeb/SVG/AttributeParser.h | 4 ++-- 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 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; -- cgit v1.2.3