Skip to content

Commit 9747bc3

Browse files
committed
Fix v141 warnings in websocketpp
1 parent c0613af commit 9747bc3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Release/libs/websocketpp/websocketpp/frame.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,17 +235,17 @@ struct basic_header {
235235
/// The variable size component of a WebSocket frame header
236236
struct extended_header {
237237
extended_header() {
238-
std::fill_n(this->bytes.begin(), MAX_EXTENDED_HEADER_LENGTH, 0x00);
238+
std::fill_n(this->bytes.begin(), MAX_EXTENDED_HEADER_LENGTH, static_cast<uint8_t>(0x00));
239239
}
240240

241241
extended_header(uint64_t payload_size) {
242-
std::fill_n(this->bytes.begin(), MAX_EXTENDED_HEADER_LENGTH, 0x00);
242+
std::fill_n(this->bytes.begin(), MAX_EXTENDED_HEADER_LENGTH, static_cast<uint8_t>(0x00));
243243

244244
copy_payload(payload_size);
245245
}
246246

247247
extended_header(uint64_t payload_size, uint32_t masking_key) {
248-
std::fill_n(this->bytes.begin(), MAX_EXTENDED_HEADER_LENGTH, 0x00);
248+
std::fill_n(this->bytes.begin(), MAX_EXTENDED_HEADER_LENGTH, static_cast<uint8_t>(0x00));
249249

250250
// Copy payload size
251251
int offset = copy_payload(payload_size);

Release/libs/websocketpp/websocketpp/impl/utilities_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace utility {
3636

3737
inline std::string to_lower(std::string const & in) {
3838
std::string out = in;
39-
std::transform(out.begin(),out.end(),out.begin(),::tolower);
39+
std::transform(out.begin(), out.end(), out.begin(), [](char ch) { return static_cast<char>(::tolower(ch)); });
4040
return out;
4141
}
4242

Release/libs/websocketpp/websocketpp/processors/hybi00.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ class hybi00 : public processor<config> {
421421
memcpy(result, reinterpret_cast<char*>(&num), 4);
422422
#endif
423423
} else {
424-
std::fill(result,result+4,0);
424+
std::fill(result,result+4, static_cast<char>(0));
425425
}
426426
}
427427

Release/libs/websocketpp/websocketpp/processors/hybi13.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ class hybi13 : public processor<config> {
464464
std::fill(
465465
m_extended_header.bytes.begin(),
466466
m_extended_header.bytes.end(),
467-
0x00
467+
static_cast<uint8_t>(0x00)
468468
);
469469
}
470470

0 commit comments

Comments
 (0)