diff options
author | David Robillard <d@drobilla.net> | 2025-07-31 21:55:10 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-07-31 21:55:10 -0400 |
commit | 961ed4e5ce11af6ceb4bdc39944133173619055c (patch) | |
tree | 9219e87c593e75354042491dc34e8a9508c76c4b | |
parent | ef38d93a3d9af06eb7ef0cd7ecf2804be210f4e2 (diff) | |
download | lv2-main.tar.xz |
Unfortunately the function effect checking added in clang 20 won't infer a
function is nonblocking if it has a static constant variable (because the
compiler might insert a lock to initialize it, or it might have an advanced
constructor in C++). This isn't a big loss here, so just inline the value.
-rw-r--r-- | include/lv2/atom/util.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/lv2/atom/util.h b/include/lv2/atom/util.h index 9a3d8a3..32e8b6a 100644 --- a/include/lv2/atom/util.h +++ b/include/lv2/atom/util.h @@ -38,9 +38,7 @@ extern "C" { static inline uint32_t lv2_atom_pad_size(uint32_t size) { - static const uint32_t mask = 7U; - - return (size + mask) & ~mask; + return (size + 7U) & ~(7U); } /** Return the total size of `atom`, including the header. */ |