Commit 0bcfeb9d authored by kenton@google.com's avatar kenton@google.com

Don't use RTTI in down_cast if GOOGLE_PROTOBUF_NO_RTTI is defined. Patch from…

Don't use RTTI in down_cast if GOOGLE_PROTOBUF_NO_RTTI is defined.  Patch from Chris Masone (of Google).
parent 8169c7fc
......@@ -283,7 +283,9 @@ inline To down_cast(From* f) { // so we only accept pointers
implicit_cast<From*, To>(0);
}
#if !defined(NDEBUG) && !defined(GOOGLE_PROTOBUF_NO_RTTI)
assert(f == NULL || dynamic_cast<To>(f) != NULL); // RTTI: debug mode only!
#endif
return static_cast<To>(f);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment