Fixed warnings.

This commit is contained in:
Takatoshi Kondo
2019-05-27 17:35:22 +09:00
parent 7cdc5b88e3
commit de99222801
2 changed files with 2 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ TEST(iterator, vector)
vec_type vec; vec_type vec;
vec.reserve(VECTOR_SIZE); vec.reserve(VECTOR_SIZE);
for (unsigned int i = 0; i < VECTOR_SIZE; i++) { for (unsigned int i = 0; i < VECTOR_SIZE; i++) {
vec.push_back(rand()); vec.push_back(static_cast<unsigned int>(rand()));
} }
msgpack::sbuffer sbuf; msgpack::sbuffer sbuf;
msgpack::pack(sbuf, vec); msgpack::pack(sbuf, vec);
@@ -53,7 +53,7 @@ TEST(iterator, map)
using map_type = map<unsigned int, unsigned int>; using map_type = map<unsigned int, unsigned int>;
map_type map; map_type map;
for (unsigned int i = 0; i < MAP_SIZE; i++) { for (unsigned int i = 0; i < MAP_SIZE; i++) {
map[rand()] = rand(); map[static_cast<unsigned int>(rand())] = static_cast<unsigned int>(rand());
} }
msgpack::sbuffer sbuf; msgpack::sbuffer sbuf;
msgpack::pack(sbuf, map); msgpack::pack(sbuf, map);

View File

@@ -192,7 +192,6 @@ TEST(size_equal_only, tuple)
} }
struct foo1 { struct foo1 {
foo1() = default;
foo1(int i, bool b):t(i, b), seo(t) {} foo1(int i, bool b):t(i, b), seo(t) {}
std::tuple<int, bool> t; std::tuple<int, bool> t;
msgpack::type::size_equal_only<std::tuple<int, bool> > seo; msgpack::type::size_equal_only<std::tuple<int, bool> > seo;
@@ -200,7 +199,6 @@ struct foo1 {
}; };
struct foo2 { struct foo2 {
foo2() = default;
foo2(int i, bool b, std::string const& s):t(i, b, s), seo(t) {} foo2(int i, bool b, std::string const& s):t(i, b, s), seo(t) {}
std::tuple<int, bool, std::string> t; std::tuple<int, bool, std::string> t;
msgpack::type::size_equal_only<std::tuple<int, bool, std::string> > seo; msgpack::type::size_equal_only<std::tuple<int, bool, std::string> > seo;