From e9f093ae15ac232f7ac0a31d64a5873fd1e306c6 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Tue, 23 Mar 2010 15:58:37 +0000 Subject: Makes gtest work with Sun Studio. Patch submitted by Hady Zalek. --- include/gtest/internal/gtest-param-util.h | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'include/gtest/internal/gtest-param-util.h') diff --git a/include/gtest/internal/gtest-param-util.h b/include/gtest/internal/gtest-param-util.h index f84bc02d..0cbb58c2 100644 --- a/include/gtest/internal/gtest-param-util.h +++ b/include/gtest/internal/gtest-param-util.h @@ -47,10 +47,6 @@ #if GTEST_HAS_PARAM_TEST -#if GTEST_HAS_RTTI -#include // NOLINT -#endif // GTEST_HAS_RTTI - namespace testing { namespace internal { @@ -63,24 +59,6 @@ namespace internal { GTEST_API_ void ReportInvalidTestCaseType(const char* test_case_name, const char* file, int line); -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Downcasts the pointer of type Base to Derived. -// Derived must be a subclass of Base. The parameter MUST -// point to a class of type Derived, not any subclass of it. -// When RTTI is available, the function performs a runtime -// check to enforce this. -template -Derived* CheckedDowncastToActualType(Base* base) { -#if GTEST_HAS_RTTI - GTEST_CHECK_(typeid(*base) == typeid(Derived)); - Derived* derived = dynamic_cast(base); // NOLINT -#else - Derived* derived = static_cast(base); // Poor man's downcast. -#endif // GTEST_HAS_RTTI - return derived; -} - template class ParamGeneratorInterface; template class ParamGenerator; -- cgit v1.2.3