File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -241,18 +241,19 @@ namespace snmalloc
241241 return BITS - clz_const (x - 1 );
242242 }
243243
244- static SNMALLOC_FAST_PATH size_t align_down (size_t value, size_t alignment)
244+ constexpr SNMALLOC_FAST_PATH size_t
245+ align_down (size_t value, size_t alignment)
245246 {
246- SNMALLOC_ASSERT (next_pow2 (alignment) == alignment);
247+ SNMALLOC_ASSERT (next_pow2_const (alignment) == alignment);
247248
248249 size_t align_1 = alignment - 1 ;
249250 value &= ~align_1;
250251 return value;
251252 }
252253
253- static inline size_t align_up (size_t value, size_t alignment)
254+ constexpr SNMALLOC_FAST_PATH size_t align_up (size_t value, size_t alignment)
254255 {
255- SNMALLOC_ASSERT (next_pow2 (alignment) == alignment);
256+ SNMALLOC_ASSERT (next_pow2_const (alignment) == alignment);
256257
257258 size_t align_1 = alignment - 1 ;
258259 value += align_1;
You can’t perform that action at this time.
0 commit comments