summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-01-26 12:03:35 -1000
committerLinus Groh <mail@linusgroh.de>2022-01-27 21:16:44 +0000
commit236fd0a2cbcf265222766161a8fb1ab3896f9b1a (patch)
tree91396f652e7be615ecec1c644803b340ce34ef71 /Userland
parent90e68bca6a6b416ae26ce7d0ca95dd7b1fcac73a (diff)
downloadserenity-236fd0a2cbcf265222766161a8fb1ab3896f9b1a.zip
LibJS: Change RelativeTimeFormat::number_format to return a reference
In the one place this will be used, we will know that the NumberFormat object is non-null. So return a reference, as the AO it is passed off to also expects a reference.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.h b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.h
index 3cf6863638..134819cae9 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.h
@@ -51,7 +51,7 @@ public:
void set_numeric(StringView numeric);
StringView numeric_string() const;
- NumberFormat* number_format() const { return m_number_format; }
+ NumberFormat& number_format() const { return *m_number_format; }
void set_number_format(NumberFormat* number_format) { m_number_format = number_format; }
private: