math: fix align_up declaration
Using add() which is non-constexpr, the align_up() itself may not be constexpr. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
47d10e2d78
commit
b5cc4c01a9
@ -89,7 +89,7 @@ namespace stdex
|
||||
///
|
||||
/// \return The first number greater or equal to a that has n lower bits zero
|
||||
///
|
||||
inline constexpr size_t align_up(size_t a, int n)
|
||||
inline size_t align_up(size_t a, int n)
|
||||
{
|
||||
const size_t mask = SIZE_MAX << n;
|
||||
return add(a, ~mask) & mask;
|
||||
|
Loading…
x
Reference in New Issue
Block a user