mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
src: modernize likely/unlikely hints
PR-URL: https://github.com/nodejs/node/pull/55155 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
1 parent
3111ed7011
commit
317d2450f9
53 files changed
+287
-219
No files matched your search
+1
-1
@@ -74,7 +74,7 @@ InternalCallbackScope::InternalCallbackScope(Environment* env,
|
||||
// We first check `env->context() != current_context` because the contexts
|
||||
// likely *are* the same, in which case we can skip the slightly more
|
||||
// expensive Environment::GetCurrent() call.
|
||||
if (UNLIKELY(env->context() != current_context)) {
|
||||
if (env->context() != current_context) [[unlikely]] {
|
||||
CHECK_EQ(Environment::GetCurrent(isolate), env);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user