From d9cd171a6bdc2672c16baf54be2050329731ceed Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Wed, 18 Jul 2018 17:45:19 -0400 Subject: [PATCH] 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 Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell Reviewed-By: Michael Dawson Reviewed-By: Colin Ihrig --- src/node_wrap.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/node_wrap.h b/src/node_wrap.h index 67cea2e715f869..42caca2dc6452d 100644 --- a/src/node_wrap.h +++ b/src/node_wrap.h @@ -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(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(wrap->UVHandle()); - }, {}); + }); return nullptr; }