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:
Yagiz Nizipli authored and GitHub committed 2024-09-30 18:04:16 +00:00
1 parent 3111ed7011
commit 317d2450f9
53 files changed
+287 -219

No files matched your search

+1 -1
View File
@@ -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);
}