redefine mi_likely/mi_unlikely to work with C++ 20 [[likely]] attributes

This commit is contained in:
Daan Leijen 2022-04-19 19:50:06 -07:00
parent d69d4c861f
commit 7bc602ebb4
12 changed files with 67 additions and 64 deletions

View file

@ -410,7 +410,7 @@ static mi_heap_t* mi_heap_of_block(const void* p) {
mi_segment_t* segment = _mi_ptr_segment(p);
bool valid = (_mi_ptr_cookie(segment) == segment->cookie);
mi_assert_internal(valid);
if (mi_unlikely(!valid)) return NULL;
if mi_unlikely(!valid) return NULL;
return mi_page_heap(_mi_segment_page_of(segment,p));
}