From c820894dc42f1f5c040499333c2287aa9a1aa46a 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. --- 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; }