Skip to content

Commit 0a054fa

Browse files
Static casts added as appropriate to eliminate VC++ warnings.
1 parent 8a6cf63 commit 0a054fa

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

example/echo_binary_text_server_demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ int main(int argc, char* argv[]) {
103103
// create buffer to send altered text back to client
104104
chops::mutable_shared_buffer buf_out;
105105
// 1st 2 bytes are the size of the message
106-
uint16_t size_val = s.size();
106+
uint16_t size_val = static_cast<uint16_t>(s.size());
107107
// endian correct data marshalling
108108
std::byte tbuf[HDR_SIZE]; // temp buffer to hold the header
109109
// write those 2 bytes to the temp buffer

test/net_ip/detail/output_queue_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void output_queue_test(const std::vector<E>& data_vec, int multiplier) {
5050
REQUIRE (qs.output_queue_size == tot);
5151
REQUIRE (qs.bytes_in_output_queue == chops::test::accum_io_buf_size(data_vec) * multiplier);
5252

53-
chops::repeat(tot, [&outq] {
53+
chops::repeat(static_cast<int>(tot), [&outq] {
5454
auto e = outq.get_next_element();
5555
// REQUIRE (e);
5656
assert (e);

test/shared_test/msg_handling_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void make_msg_vec_test(F&& f) {
110110

111111
GIVEN ("A preamble and a char to repeat") {
112112
auto empty = make_empty_body_msg(f);
113-
int delta = empty.size();
113+
auto delta = empty.size();
114114
REQUIRE (delta <= 2);
115115
WHEN ("make_msg_vec is called") {
116116
auto vb = make_msg_vec(f, "Good tea!", 'Z', 20);

0 commit comments

Comments
 (0)