diff options
-rw-r--r-- | src/core/lib/gprpp/ref_counted.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lib/gprpp/ref_counted.h b/src/core/lib/gprpp/ref_counted.h index 16c7912fc6..ab589fc01a 100644 --- a/src/core/lib/gprpp/ref_counted.h +++ b/src/core/lib/gprpp/ref_counted.h @@ -41,7 +41,7 @@ class RefCounted { public: RefCountedPtr<Child> Ref() GRPC_MUST_USE_RESULT { IncrementRefCount(); - return RefCountedPtr<Child>(reinterpret_cast<Child*>(this)); + return RefCountedPtr<Child>(static_cast<Child*>(this)); } // TODO(roth): Once all of our code is converted to C++ and can use @@ -89,7 +89,7 @@ class RefCountedWithTracing { public: RefCountedPtr<Child> Ref() GRPC_MUST_USE_RESULT { IncrementRefCount(); - return RefCountedPtr<Child>(reinterpret_cast<Child*>(this)); + return RefCountedPtr<Child>(static_cast<Child*>(this)); } RefCountedPtr<Child> Ref(const DebugLocation& location, |