diff options
author | Maxim Pimenov <m@maps.me> | 2017-03-27 16:52:31 +0300 |
---|---|---|
committer | Maxim Pimenov <m@maps.me> | 2017-03-27 17:02:46 +0300 |
commit | 5c3f3080726b6e5551bea70f1470b5a52580edca (patch) | |
tree | 0c4f3fca0457923fe35efc82b76cd2a20246979a /base | |
parent | e6bbc3477d4836b2421f0b0d84c7b954b7f73e11 (diff) |
Fixed some warnings.
Diffstat (limited to 'base')
-rw-r--r-- | base/base_tests/bits_test.cpp | 7 | ||||
-rw-r--r-- | base/base_tests/threads_test.cpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/base/base_tests/bits_test.cpp b/base/base_tests/bits_test.cpp index 5263246dae..14c9cada97 100644 --- a/base/base_tests/bits_test.cpp +++ b/base/base_tests/bits_test.cpp @@ -1,8 +1,9 @@ #include "testing/testing.hpp" #include "base/bits.hpp" -#include "std/cstdlib.hpp" +#include "base/checked_cast.hpp" +#include <cstdlib> #include <vector> namespace @@ -37,8 +38,8 @@ UNIT_TEST(PopcountArray32) uint32_t expectedPopCount = 0; for (size_t i = 0; i < v.size(); ++i) expectedPopCount += PopCountSimple(v[i]); - TEST_EQUAL(bits::PopCount(v.empty() ? NULL : &v[0], v.size()), expectedPopCount, - (j, v.size(), expectedPopCount)); + TEST_EQUAL(bits::PopCount(v.empty() ? NULL : &v[0], base::asserted_cast<uint32_t>(v.size())), + expectedPopCount, (j, v.size(), expectedPopCount)); } } diff --git a/base/base_tests/threads_test.cpp b/base/base_tests/threads_test.cpp index e482cd55bb..98933c7682 100644 --- a/base/base_tests/threads_test.cpp +++ b/base/base_tests/threads_test.cpp @@ -20,7 +20,7 @@ struct GeneratorThread : public threads::IRoutine { for (size_t i = 0; i < MAX_COUNT; ++i) { - m_vec.push_back(i); + m_vec.push_back(static_cast<int>(i)); summ += i; } } |