diff options
author | Robert Woldberg <robert@woldberg.com> | 2018-10-12 17:12:55 (GMT) |
---|---|---|
committer | Robert Woldberg <robert@woldberg.com> | 2018-10-12 17:12:55 (GMT) |
commit | dec3b81a08f8e2d7f803f30fee2faa8b27c4bc26 (patch) | |
tree | e9c41206b764c4070d6bc24ec3e7d0db7262aba9 /googlemock | |
parent | 864b6c2d35db5c2c8ca4a4bad66e295a64f47011 (diff) | |
download | googletest-dec3b81a08f8e2d7f803f30fee2faa8b27c4bc26.zip googletest-dec3b81a08f8e2d7f803f30fee2faa8b27c4bc26.tar.gz googletest-dec3b81a08f8e2d7f803f30fee2faa8b27c4bc26.tar.bz2 |
Change types to remove cast warnings.refs/pull/1908/head
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/include/gmock/gmock-spec-builders.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index c8e864c..8f0528d 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<const Action<F>*>(untyped_actions_[count - 1]) : + *static_cast<const Action<F>*>(untyped_actions_[static_cast<size_t>(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<int>(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<F>* const expectation = static_cast<TypedExpectation<F>*>(untyped_expectations_[i].get()); *why << "\n"; |