mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
u_math.h: Change power of two assert to fix warning C4146: unary minus operator applied to unsigned type, result still unsigned
Reviewed-By: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Jesse Natalie <None> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
This commit is contained in:
parent
8f8438bd8c
commit
b5617058e4
1 changed files with 1 additions and 1 deletions
|
|
@ -830,7 +830,7 @@ util_clamped_uadd(unsigned a, unsigned b)
|
|||
static inline bool
|
||||
util_is_aligned(uintmax_t n, uintmax_t a)
|
||||
{
|
||||
assert(a == (a & -a));
|
||||
assert((a != 0) && ((a & (a - 1)) == 0));
|
||||
return (n & (a - 1)) == 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue