summaryrefslogtreecommitdiff
path: root/src/tls_wrap.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-12-09 04:40:20 +0100
committerAnna Henningsen <anna@addaleax.net>2017-12-13 06:45:56 +0100
commit24b0f67c2b0b97a4b79f9582e805785cb317daa0 (patch)
tree40b9f6b2c6fdf67eeda4462e6428088dc61611d7 /src/tls_wrap.cc
parent486290b1fefe31e5dc3d77aa51cfeae208d0e0fd (diff)
downloadnode-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.cc7
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);
}