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:
committed by
GitHub
parent
cd0311b26f
commit
faa80037bb
@@ -32,7 +32,7 @@ namespace snmalloc
|
||||
// If defined should be initially false;
|
||||
SNMALLOC_ASSERT(first == nullptr || *first == false);
|
||||
|
||||
if (unlikely(!initialised.load(std::memory_order_acquire)))
|
||||
if (SNMALLOC_UNLIKELY(!initialised.load(std::memory_order_acquire)))
|
||||
{
|
||||
FlagLock lock(flag);
|
||||
if (!initialised)
|
||||
|
||||
Reference in New Issue
Block a user