remove implicit casts
This commit is contained in:
@@ -85,7 +85,6 @@ include_directories(
|
||||
# VS 2013 12 1800 std::tr1::tuple
|
||||
# VS 2015 14 1900 std::tuple
|
||||
# VS 2017 15 >= 1910 std::tuple
|
||||
|
||||
if (MSVC AND MSVC_VERSION EQUAL 1700)
|
||||
add_definitions(/D _VARIADIC_MAX=10)
|
||||
endif()
|
||||
|
||||
@@ -646,7 +646,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
// Prevent `warning C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1 namespace and TR1-only machinery are deprecated and will be REMOVED.`
|
||||
# define GTEST_HAS_TR1_TUPLE 0
|
||||
# else
|
||||
// The user didn't tell us not to do it, so we assume it's OK.
|
||||
// The user didn't tell us not to do it, so we assume it's OK.
|
||||
# define GTEST_HAS_TR1_TUPLE 1
|
||||
# endif
|
||||
#endif // GTEST_HAS_TR1_TUPLE
|
||||
|
||||
@@ -1092,8 +1092,8 @@ TEST(PrintTr1TupleTest, VariousSizes) {
|
||||
::std::tr1::tuple<bool, char, short, testing::internal::Int32, // NOLINT
|
||||
testing::internal::Int64, float, double, const char*, void*,
|
||||
std::string>
|
||||
t10(false, 'a', ImplicitCast_<short>(3), 4, 5, 1.5F, -2.5, str, ImplicitCast_<void*>(NULL),
|
||||
"10");
|
||||
t10(false, 'a', static_cast<short>(3), 4, 5, 1.5F, -2.5, str,
|
||||
ImplicitCast_<void*>(NULL), "10");
|
||||
EXPECT_EQ("(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, " + PrintPointer(str) +
|
||||
" pointing to \"8\", NULL, \"10\")",
|
||||
Print(t10));
|
||||
@@ -1152,7 +1152,7 @@ TEST(PrintStdTupleTest, VariousSizes) {
|
||||
::std::tuple<bool, char, short, testing::internal::Int32, // NOLINT
|
||||
testing::internal::Int64, float, double, const char*, void*,
|
||||
std::string>
|
||||
t10(false, 'a', ImplicitCast_<short>(3), 4, 5, 1.5F, -2.5, str,
|
||||
t10(false, 'a', static_cast<short>(3), 4, 5, 1.5F, -2.5, str,
|
||||
ImplicitCast_<void*>(NULL), "10");
|
||||
EXPECT_EQ("(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, " + PrintPointer(str) +
|
||||
" pointing to \"8\", NULL, \"10\")",
|
||||
|
||||
Reference in New Issue
Block a user