Skip to content

Commit

Permalink
src: remove unnecessary else
Browse files Browse the repository at this point in the history
Argument is not used by the only caller.

PR-URL: #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>
  • Loading branch information
maclover7 authored and targos committed Jul 24, 2018
1 parent 4f8620e commit d9cd171
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit d9cd171

Please sign in to comment.