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

@@ -240,7 +240,7 @@ namespace snmalloc
{
if constexpr (potentially_out_of_range)
{
if (unlikely(body_opt == nullptr))
if (SNMALLOC_UNLIKELY(body_opt == nullptr))
return default_value;
}