summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2023-01-23 10:48:49 -0500
committerLinus Groh <mail@linusgroh.de>2023-01-23 18:09:23 +0000
commit9c5820326d62f52b408d8f4e271d8360108686f2 (patch)
treeaae6cbc7926e5325e2042ba14a2b7d5cb518a0c5 /AK
parentb347aebc3e9789d073fa953cbdccf8fc7217daf0 (diff)
downloadserenity-9c5820326d62f52b408d8f4e271d8360108686f2.zip
AK: Make FixedPoint::create_raw public and constexpr
Diffstat (limited to 'AK')
-rw-r--r--AK/FixedPoint.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/AK/FixedPoint.h b/AK/FixedPoint.h
index 3836077775..72948d1c50 100644
--- a/AK/FixedPoint.h
+++ b/AK/FixedPoint.h
@@ -74,6 +74,13 @@ public:
return value;
}
+ static constexpr This create_raw(Underlying value)
+ {
+ This t {};
+ t.raw() = value;
+ return t;
+ }
+
constexpr Underlying raw() const
{
return m_value;
@@ -379,13 +386,6 @@ private:
return FixedPoint<P, U>::create_raw(raw_value);
}
- static This create_raw(Underlying value)
- {
- This t {};
- t.raw() = value;
- return t;
- }
-
Underlying m_value;
};