mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
AK: Loosen FixedPoint template contraints and forward-declare it
Because AK/Concepts.h includes AK/Forward.h and concepts cannot be forward declared, slightly losen the FixedPoint template arguments so that we can forward declare it in AK/Forward.h
This commit is contained in:
parent
92e337de21
commit
77b3230c80
Notes:
sideshowbarker
2024-07-17 20:21:49 +09:00
Author: https://github.com/tomuta
Commit: 77b3230c80
Pull-request: https://github.com/SerenityOS/serenity/pull/11439
Reviewed-by: https://github.com/kleinesfilmroellchen
Reviewed-by: https://github.com/linusg ✅
2 changed files with 6 additions and 1 deletions
|
@ -14,7 +14,8 @@
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
// FIXME: this always uses round to nearest break-tie to even
|
// FIXME: this always uses round to nearest break-tie to even
|
||||||
template<size_t precision, Integral Underlying = i32>
|
// FIXME: use the Integral concept to constrain Underlying
|
||||||
|
template<size_t precision, typename Underlying>
|
||||||
class FixedPoint {
|
class FixedPoint {
|
||||||
using This = FixedPoint<precision, Underlying>;
|
using This = FixedPoint<precision, Underlying>;
|
||||||
constexpr static Underlying radix_mask = (1 << precision) - 1;
|
constexpr static Underlying radix_mask = (1 << precision) - 1;
|
||||||
|
|
|
@ -90,6 +90,9 @@ class Badge;
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class FixedArray;
|
class FixedArray;
|
||||||
|
|
||||||
|
template<size_t precision, typename Underlying = i32>
|
||||||
|
class FixedPoint;
|
||||||
|
|
||||||
template<typename>
|
template<typename>
|
||||||
class Function;
|
class Function;
|
||||||
|
|
||||||
|
@ -144,6 +147,7 @@ using AK::DuplexMemoryStream;
|
||||||
using AK::Error;
|
using AK::Error;
|
||||||
using AK::ErrorOr;
|
using AK::ErrorOr;
|
||||||
using AK::FixedArray;
|
using AK::FixedArray;
|
||||||
|
using AK::FixedPoint;
|
||||||
using AK::FlyString;
|
using AK::FlyString;
|
||||||
using AK::Function;
|
using AK::Function;
|
||||||
using AK::GenericLexer;
|
using AK::GenericLexer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue