aboutsummaryrefslogtreecommitdiffstats
path: root/include/gmock/internal/gmock-port.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gmock/internal/gmock-port.h')
-rw-r--r--include/gmock/internal/gmock-port.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/gmock/internal/gmock-port.h b/include/gmock/internal/gmock-port.h
index d242c8e4..75be9edd 100644
--- a/include/gmock/internal/gmock-port.h
+++ b/include/gmock/internal/gmock-port.h
@@ -162,7 +162,9 @@ inline To down_cast(From* f) { // so we only accept pointers
implicit_cast<From*, To>(0);
}
+#if GTEST_HAS_RTTI
assert(f == NULL || dynamic_cast<To>(f) != NULL); // RTTI: debug mode only!
+#endif
return static_cast<To>(f);
}