mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-08-24 16:24:47 +03:00
redefine mi_likely/mi_unlikely to work with C++ 20 [[likely]] attributes
This commit is contained in:
parent
d69d4c861f
commit
7bc602ebb4
12 changed files with 67 additions and 64 deletions
|
@ -119,7 +119,7 @@ mi_decl_nodiscard long mi_option_get(mi_option_t option) {
|
|||
if (option < 0 || option >= _mi_option_last) return 0;
|
||||
mi_option_desc_t* desc = &options[option];
|
||||
mi_assert(desc->option == option); // index should match the option
|
||||
if (mi_unlikely(desc->init == UNINIT)) {
|
||||
if mi_unlikely(desc->init == UNINIT) {
|
||||
mi_option_init(desc);
|
||||
}
|
||||
return desc->value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue