Skip to content

Commit d6bcc44

Browse files
anonrigtargos
authored andcommittedOct 4, 2024
src: modernize likely/unlikely hints
PR-URL: #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>
1 parent c7ed2ff commit d6bcc44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+292
-223
lines changed
 

‎.cpplint

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set noparent
2-
filter=-build/include_alpha,-build/include_subdir,-build/include_what_you_use,-legal/copyright,-readability/nolint
2+
filter=-build/include_alpha,-build/include_subdir,-build/include_what_you_use,-legal/copyright,-readability/nolint,-readability/braces
33
linelength=80

‎src/api/callback.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ InternalCallbackScope::InternalCallbackScope(Environment* env,
7474
// We first check `env->context() != current_context` because the contexts
7575
// likely *are* the same, in which case we can skip the slightly more
7676
// expensive Environment::GetCurrent() call.
77-
if (UNLIKELY(env->context() != current_context)) {
77+
if (env->context() != current_context) [[unlikely]] {
7878
CHECK_EQ(Environment::GetCurrent(isolate), env);
7979
}
8080

0 commit comments

Comments
 (0)
Please sign in to comment.