Use proper C++ casts in Location.h

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

--

PiperOrigin-RevId: 244070052
This commit is contained in:
Nicolas Vasilache 2019-04-17 14:38:45 -07:00 committed by Mehdi Amini
parent 4aa9235ae0
commit cfdffd90a0
1 changed files with 1 additions and 1 deletions

View File

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