Merge pull request #2747 from liutikas/master

Fix unused variables warnings in generated_message_reflection.h
This commit is contained in:
Adam Cozzette 2017-02-24 14:43:14 -08:00 committed by GitHub
commit 66c64e7045

View file

@ -674,6 +674,8 @@ class LIBPROTOBUF_EXPORT GeneratedMessageReflection PROTOBUF_FINAL
template<typename To, typename From>
inline To dynamic_cast_if_available(From from) {
#if defined(GOOGLE_PROTOBUF_NO_RTTI) || (defined(_MSC_VER)&&!defined(_CPPRTTI))
// Avoid the compiler warning about unused variables.
(void)from;
return NULL;
#else
return dynamic_cast<To>(from);