Merge pull request #5033 from xfxyjwf/up

Fix issues discovered in up-integration.
pull/5042/head
Feng Xiao 6 years ago committed by GitHub
commit d39c7ef6eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/google/protobuf/message.h

@ -1160,7 +1160,7 @@ const T* DynamicCastToGenerated(const Message* from) {
(void)unused;
#ifdef GOOGLE_PROTOBUF_NO_RTTI
bool ok = &T::default_instance()->GetReflection() == from->GetReflection();
bool ok = T::default_instance().GetReflection() == from->GetReflection();
return ok ? down_cast<const T*>(from) : nullptr;
#else
return dynamic_cast<const T*>(from);

Loading…
Cancel
Save