AK: Make FixedPoint::create_raw public and constexpr
This commit is contained in:
parent
b347aebc3e
commit
9c5820326d
Notes:
sideshowbarker
2024-07-17 01:21:11 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/9c5820326d Pull-request: https://github.com/SerenityOS/serenity/pull/17148 Reviewed-by: https://github.com/linusg
1 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue