src: remove unnecessary else
Argument is not used by the only caller. PR-URL: https://github.com/nodejs/node/pull/21874 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
8ac916309b
commit
b016d98cc3
@ -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)) { \
|
||||
@ -49,8 +49,6 @@ namespace node {
|
||||
env->pipe_constructor_template()->HasInstance(obj)) { \
|
||||
PipeWrap* const wrap = Unwrap<PipeWrap>(obj); \
|
||||
BODY \
|
||||
} else { \
|
||||
ELSE \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user