mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-14 23:07:58 +02:00
Fixed warnings.
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user