Skip to content

Commit

Permalink
Static casts added as appropriate to eliminate VC++ warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffg-softwarelibre committed Mar 30, 2020
1 parent 8a6cf63 commit 0a054fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/echo_binary_text_server_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int main(int argc, char* argv[]) {
// create buffer to send altered text back to client
chops::mutable_shared_buffer buf_out;
// 1st 2 bytes are the size of the message
uint16_t size_val = s.size();
uint16_t size_val = static_cast<uint16_t>(s.size());
// endian correct data marshalling
std::byte tbuf[HDR_SIZE]; // temp buffer to hold the header
// write those 2 bytes to the temp buffer
Expand Down
2 changes: 1 addition & 1 deletion test/net_ip/detail/output_queue_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void output_queue_test(const std::vector<E>& data_vec, int multiplier) {
REQUIRE (qs.output_queue_size == tot);
REQUIRE (qs.bytes_in_output_queue == chops::test::accum_io_buf_size(data_vec) * multiplier);

chops::repeat(tot, [&outq] {
chops::repeat(static_cast<int>(tot), [&outq] {
auto e = outq.get_next_element();
// REQUIRE (e);
assert (e);
Expand Down
2 changes: 1 addition & 1 deletion test/shared_test/msg_handling_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void make_msg_vec_test(F&& f) {

GIVEN ("A preamble and a char to repeat") {
auto empty = make_empty_body_msg(f);
int delta = empty.size();
auto delta = empty.size();
REQUIRE (delta <= 2);
WHEN ("make_msg_vec is called") {
auto vb = make_msg_vec(f, "Good tea!", 'Z', 20);
Expand Down

0 comments on commit 0a054fa

Please sign in to comment.