mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8183570: Rework is_aligned_ to avoid multiple evaluation of the size expression
Reviewed-by: tschatzl, kbarrett
This commit is contained in:
parent
34ff291920
commit
b7b5e80b9d
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
#define align_up_(size, alignment) (align_down_((size) + align_mask(alignment), (alignment)))
|
#define align_up_(size, alignment) (align_down_((size) + align_mask(alignment), (alignment)))
|
||||||
|
|
||||||
#define is_aligned_(size, alignment) ((size) == (align_up_((size), (alignment))))
|
#define is_aligned_(size, alignment) (((size) & align_mask(alignment)) == 0)
|
||||||
|
|
||||||
// Temporary declaration until this file has been restructured.
|
// Temporary declaration until this file has been restructured.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue