mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fixes or silences some VCPP warnings
This commit is contained in:
@@ -38,7 +38,6 @@ enum correctness_mode {
|
||||
LENGTH = 1
|
||||
};
|
||||
|
||||
// test class for 9.1.* and 9.2.*
|
||||
class message_test : public case_handler {
|
||||
public:
|
||||
message_test(uint64_t message_size,
|
||||
@@ -75,7 +74,7 @@ public:
|
||||
m_rtts = extract_bool(cmd,"rtts");
|
||||
|
||||
// specific to message_test
|
||||
m_message_count = extract_number<size_t>(cmd,"size");
|
||||
m_message_count = extract_number<uint64_t>(cmd,"size");
|
||||
m_message_size = extract_number<uint64_t>(cmd,"count");
|
||||
m_timeout = extract_number<uint64_t>(cmd,"timeout");
|
||||
|
||||
@@ -94,13 +93,13 @@ public:
|
||||
void on_open(connection_ptr con) {
|
||||
m_msg = con->get_data_message();
|
||||
|
||||
m_data.reserve(m_message_size);
|
||||
m_data.reserve(static_cast<size_t>(m_message_size));
|
||||
|
||||
if (!m_binary) {
|
||||
fill_utf8(m_data,m_message_size,true);
|
||||
fill_utf8(m_data,static_cast<size_t>(m_message_size),true);
|
||||
m_msg->reset(websocketpp::frame::opcode::TEXT);
|
||||
} else {
|
||||
fill_binary(m_data,m_message_size,true);
|
||||
fill_binary(m_data,static_cast<size_t>(m_message_size),true);
|
||||
m_msg->reset(websocketpp::frame::opcode::BINARY);
|
||||
}
|
||||
|
||||
@@ -118,7 +117,9 @@ public:
|
||||
}
|
||||
|
||||
void on_message(connection_ptr con,websocketpp::message::data_ptr msg) {
|
||||
if ((m_mode == LENGTH && msg->get_payload().size() == m_data.size()) || (m_mode == EXACT && msg->get_payload() == m_data)) {
|
||||
if ((m_mode == LENGTH && msg->get_payload().size() == m_data.size()) ||
|
||||
(m_mode == EXACT && msg->get_payload() == m_data))
|
||||
{
|
||||
m_acks++;
|
||||
m_bytes += m_message_size;
|
||||
mark();
|
||||
@@ -142,7 +143,7 @@ public:
|
||||
}
|
||||
private:
|
||||
// Simulation Parameters
|
||||
size_t m_message_size;
|
||||
uint64_t m_message_size;
|
||||
uint64_t m_message_count;
|
||||
uint64_t m_timeout;
|
||||
bool m_binary;
|
||||
|
||||
@@ -45,6 +45,12 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Disable "warning C4355: 'this' : used in base member initializer list".
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4355)
|
||||
#endif
|
||||
|
||||
using boost::asio::ip::tcp;
|
||||
|
||||
namespace websocketpp {
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Disable "warning C4355: 'this' : used in base member initializer list".
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4355)
|
||||
#endif
|
||||
|
||||
namespace websocketpp {
|
||||
|
||||
// Forward declarations
|
||||
|
||||
Reference in New Issue
Block a user