From dec3b81a08f8e2d7f803f30fee2faa8b27c4bc26 Mon Sep 17 00:00:00 2001 From: Robert Woldberg Date: Fri, 12 Oct 2018 11:12:55 -0600 Subject: Change types to remove cast warnings. --- googlemock/include/gmock/gmock-spec-builders.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'googlemock/include') diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index c8e864cc..8f0528de 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -1185,7 +1185,7 @@ class TypedExpectation : public ExpectationBase { } return count <= action_count ? - *static_cast*>(untyped_actions_[count - 1]) : + *static_cast*>(untyped_actions_[static_cast(count - 1)]) : repeated_action(); } @@ -1762,12 +1762,12 @@ class FunctionMockerBase : public UntypedFunctionMockerBase { ::std::ostream* why) const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) { g_gmock_mutex.AssertHeld(); - const int count = static_cast(untyped_expectations_.size()); + const size_t count = untyped_expectations_.size(); *why << "Google Mock tried the following " << count << " " << (count == 1 ? "expectation, but it didn't match" : "expectations, but none matched") << ":\n"; - for (int i = 0; i < count; i++) { + for (size_t i = 0; i < count; i++) { TypedExpectation* const expectation = static_cast*>(untyped_expectations_[i].get()); *why << "\n"; -- cgit v1.2.3