diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-25 22:15:27 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-25 22:15:27 +0000 |
commit | b03ca47c10be432be5d984cb91ce22c81dfa2252 (patch) | |
tree | ad9d00158a7fa090e0364e9ccf6e05db0c60476d /src/gtest-internal-inl.h | |
parent | f33b34537347ac5f16774649f79cd5b5b9128b13 (diff) | |
download | gtest-b03ca47c10be432be5d984cb91ce22c81dfa2252.tar.gz gtest-b03ca47c10be432be5d984cb91ce22c81dfa2252.tar.bz2 gtest-b03ca47c10be432be5d984cb91ce22c81dfa2252.tar.xz |
Fixes MSVC warnings in 64-bit mode.
git-svn-id: http://googletest.googlecode.com/svn/trunk@379 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest-internal-inl.h')
-rw-r--r-- | src/gtest-internal-inl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gtest-internal-inl.h b/src/gtest-internal-inl.h index d14fb6a..269798a 100644 --- a/src/gtest-internal-inl.h +++ b/src/gtest-internal-inl.h @@ -251,7 +251,7 @@ bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id); // the given predicate. template <class Container, typename Predicate> inline int CountIf(const Container& c, Predicate predicate) { - return std::count_if(c.begin(), c.end(), predicate); + return static_cast<int>(std::count_if(c.begin(), c.end(), predicate)); } // Applies a function/functor to each element in the container. @@ -294,7 +294,7 @@ void ShuffleRange(internal::Random* random, int begin, int end, // Performs an in-place shuffle of the vector's elements. template <typename E> inline void Shuffle(internal::Random* random, std::vector<E>* v) { - ShuffleRange(random, 0, v->size(), v); + ShuffleRange(random, 0, static_cast<int>(v->size()), v); } // A function for deleting an object. Handy for being used as a |