put likely/unlikely in scope (#420)

* put likely/unlikely in scope

Signed-off-by: SchrodingerZhu <i@zhuyi.fan>

* make clang-format happy

Signed-off-by: SchrodingerZhu <i@zhuyi.fan>
This commit is contained in:
Schrodinger ZHU Yifan
2021-11-18 00:05:52 +08:00
committed by GitHub
parent cd0311b26f
commit faa80037bb
11 changed files with 36 additions and 33 deletions

View File

@@ -175,7 +175,7 @@ namespace snmalloc
anonymous_memory_fd,
0);
if (likely(r != MAP_FAILED))
if (SNMALLOC_LIKELY(r != MAP_FAILED))
{
return;
}
@@ -238,7 +238,7 @@ namespace snmalloc
VM_PROT_READ | VM_PROT_WRITE,
VM_INHERIT_COPY);
if (unlikely(kr != KERN_SUCCESS))
if (SNMALLOC_UNLIKELY(kr != KERN_SUCCESS))
{
return nullptr;
}