Use proper C++ casts in Types.h

This CL reduces the amount of warning spew when compiling with CMake on Linux.

--

PiperOrigin-RevId: 244070668
This commit is contained in:
Nicolas Vasilache 2019-04-17 14:41:33 -07:00 committed by Mehdi Amini
parent cfdffd90a0
commit 5b0c2420f7
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ public:
return static_cast<const void *>(type);
}
static Type getFromOpaquePointer(const void *pointer) {
return Type((ImplType *)(pointer));
return Type(reinterpret_cast<ImplType *>(const_cast<void *>(pointer)));
}
protected: