mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-22 16:02:31 +02:00
Problem: use of C-style casts
Solution: use static_cast/reinterpret_cast instead
This commit is contained in:

committed by
Simon Giesecke

parent
a83c57d0bb
commit
cd954e207d
@@ -36,7 +36,7 @@ void tearDown ()
|
||||
|
||||
int getlen (const zmq::generic_mtrie_t<int>::prefix_t &data_)
|
||||
{
|
||||
return (int) strlen (reinterpret_cast<const char *> (data_));
|
||||
return static_cast<int> (strlen (reinterpret_cast<const char *> (data_)));
|
||||
}
|
||||
|
||||
void test_create ()
|
||||
@@ -303,7 +303,8 @@ void test_add_multiple_reverse ()
|
||||
|
||||
zmq::generic_mtrie_t<int> mtrie;
|
||||
for (int i = 2; i >= 0; --i) {
|
||||
add_indexed_expect_unique (mtrie, pipes, names, (size_t) i);
|
||||
add_indexed_expect_unique (mtrie, pipes, names,
|
||||
static_cast<size_t> (i));
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < 3; ++i) {
|
||||
|
Reference in New Issue
Block a user