Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: remove unnecessary else #21874

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/node_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace node {

// TODO(addaleax): Use real inheritance for the JS object templates to avoid
// this unnecessary case switching.
#define WITH_GENERIC_UV_STREAM(env, obj, BODY, ELSE) \
#define WITH_GENERIC_UV_STREAM(env, obj, BODY) \
do { \
if (env->tcp_constructor_template().IsEmpty() == false && \
env->tcp_constructor_template()->HasInstance(obj)) { \
Expand All @@ -49,8 +49,6 @@ namespace node {
env->pipe_constructor_template()->HasInstance(obj)) { \
PipeWrap* const wrap = Unwrap<PipeWrap>(obj); \
BODY \
} else { \
ELSE \
} \
} while (0)

Expand All @@ -62,7 +60,7 @@ inline uv_stream_t* HandleToStream(Environment* env,
if (wrap == nullptr)
return nullptr;
return reinterpret_cast<uv_stream_t*>(wrap->UVHandle());
}, {});
});

return nullptr;
}
Expand Down