mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
AK: Fix typos
This commit is contained in:
parent
97d27c312a
commit
5e21759f3d
Notes:
sideshowbarker
2024-07-18 03:16:10 +09:00
Author: https://github.com/nico
Commit: 5e21759f3d
Pull-request: https://github.com/SerenityOS/serenity/pull/10287
Reviewed-by: https://github.com/linusg ✅
1 changed files with 4 additions and 4 deletions
|
@ -318,7 +318,7 @@ public:
|
||||||
return sizeof(R);
|
return sizeof(R);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Arithmetics
|
// Arithmetic
|
||||||
|
|
||||||
// implies size of less than u64, so passing references isn't useful
|
// implies size of less than u64, so passing references isn't useful
|
||||||
template<Unsigned U>
|
template<Unsigned U>
|
||||||
|
@ -676,18 +676,18 @@ public:
|
||||||
|
|
||||||
constexpr size_t log2()
|
constexpr size_t log2()
|
||||||
{
|
{
|
||||||
// FIXME: propper rounding
|
// FIXME: proper rounding
|
||||||
return sizeof(R) - clz();
|
return sizeof(R) - clz();
|
||||||
}
|
}
|
||||||
constexpr size_t logn(u64 base)
|
constexpr size_t logn(u64 base)
|
||||||
{
|
{
|
||||||
// FIXME: propper rounding
|
// FIXME: proper rounding
|
||||||
return log2() / (sizeof(u64) - __builtin_clzll(base));
|
return log2() / (sizeof(u64) - __builtin_clzll(base));
|
||||||
}
|
}
|
||||||
template<Unsigned U>
|
template<Unsigned U>
|
||||||
requires(sizeof(U) > sizeof(u64)) constexpr size_t logn(U base)
|
requires(sizeof(U) > sizeof(u64)) constexpr size_t logn(U base)
|
||||||
{
|
{
|
||||||
// FIXME: propper rounding
|
// FIXME: proper rounding
|
||||||
return log2() / base.log2();
|
return log2() / base.log2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue