diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-12-09 04:40:20 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-12-13 06:45:56 +0100 |
commit | 24b0f67c2b0b97a4b79f9582e805785cb317daa0 (patch) | |
tree | 40b9f6b2c6fdf67eeda4462e6428088dc61611d7 /src/tls_wrap.cc | |
parent | 486290b1fefe31e5dc3d77aa51cfeae208d0e0fd (diff) | |
download | node-new-24b0f67c2b0b97a4b79f9582e805785cb317daa0.tar.gz |
src: remove `StreamResourc::Cast()`
This is not necessary since C++ already has `static_cast`
as a proper way to cast inside a class hierarchy.
PR-URL: https://github.com/nodejs/node/pull/17564
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/tls_wrap.cc')
-rw-r--r-- | src/tls_wrap.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 3f5ed2c575..62d3fd06fe 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -347,7 +347,7 @@ void TLSWrap::EncOut() { void TLSWrap::EncOutCb(WriteWrap* req_wrap, int status) { - TLSWrap* wrap = req_wrap->wrap()->Cast<TLSWrap>(); + TLSWrap* wrap = static_cast<TLSWrap*>(req_wrap->wrap()); req_wrap->Dispose(); // We should not be getting here after `DestroySSL`, because all queued writes @@ -534,11 +534,6 @@ bool TLSWrap::ClearIn() { } -void* TLSWrap::Cast() { - return reinterpret_cast<void*>(this); -} - - AsyncWrap* TLSWrap::GetAsyncWrap() { return static_cast<AsyncWrap*>(this); } |