Skip to content

Commit fc16fcd

Browse files
committed
Suppress warning C4592 in websocket++
1 parent 9e5c60a commit fc16fcd

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

Release/libs/websocketpp/websocketpp/connection.hpp

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ typedef lib::function<void(lib::error_code const & ec)> write_frame_handler;
161161
* @todo Move this to configs to allow compile/runtime disabling or enabling
162162
* of protocol versions
163163
*/
164+
#pragma warning(push)
165+
#pragma warning(disable : 4592)
164166
static std::vector<int> const versions_supported = {0,7,8,13};
167+
#pragma warning(pop)
165168
#else
166169
/// Helper array to get around lack of initializer lists pre C++11
167170
static int const helper[] = {0,7,8,13};
@@ -534,7 +537,7 @@ class connection
534537

535538
/// Get maximum message size
536539
/**
537-
* Get maximum message size. Maximum message size determines the point at
540+
* Get maximum message size. Maximum message size determines the point at
538541
* which the connection will fail with the message_too_big protocol error.
539542
*
540543
* The default is set by the endpoint that creates the connection.
@@ -544,11 +547,11 @@ class connection
544547
size_t get_max_message_size() const {
545548
return m_max_message_size;
546549
}
547-
550+
548551
/// Set maximum message size
549552
/**
550-
* Set maximum message size. Maximum message size determines the point at
551-
* which the connection will fail with the message_too_big protocol error.
553+
* Set maximum message size. Maximum message size determines the point at
554+
* which the connection will fail with the message_too_big protocol error.
552555
* This value may be changed during the connection.
553556
*
554557
* The default is set by the endpoint that creates the connection.
@@ -563,7 +566,7 @@ class connection
563566
m_processor->set_max_message_size(new_value);
564567
}
565568
}
566-
569+
567570
/// Get maximum HTTP message body size
568571
/**
569572
* Get maximum HTTP message body size. Maximum message body size determines
@@ -579,7 +582,7 @@ class connection
579582
size_t get_max_http_body_size() const {
580583
return m_request.get_max_body_size();
581584
}
582-
585+
583586
/// Set maximum HTTP message body size
584587
/**
585588
* Set maximum HTTP message body size. Maximum message body size determines
@@ -683,14 +686,14 @@ class connection
683686
* @return An error code
684687
*/
685688
lib::error_code interrupt();
686-
689+
687690
/// Transport inturrupt callback
688691
void handle_interrupt();
689-
692+
690693
/// Pause reading of new data
691694
/**
692-
* Signals to the connection to halt reading of new data. While reading is paused,
693-
* the connection will stop reading from its associated socket. In turn this will
695+
* Signals to the connection to halt reading of new data. While reading is paused,
696+
* the connection will stop reading from its associated socket. In turn this will
694697
* result in TCP based flow control kicking in and slowing data flow from the remote
695698
* endpoint.
696699
*
@@ -702,7 +705,7 @@ class connection
702705
*
703706
* If supported by the transport this is done asynchronously. As such reading may not
704707
* stop until the current read operation completes. Typically you can expect to
705-
* receive no more bytes after initiating a read pause than the size of the read
708+
* receive no more bytes after initiating a read pause than the size of the read
706709
* buffer.
707710
*
708711
* If reading is paused for this connection already nothing is changed.
@@ -1357,7 +1360,7 @@ class connection
13571360
* Includes: error code and message for why it was failed
13581361
*/
13591362
void log_fail_result();
1360-
1363+
13611364
/// Prints information about HTTP connections
13621365
/**
13631366
* Includes: TODO
@@ -1506,7 +1509,7 @@ class connection
15061509

15071510
/// Detailed internal error code
15081511
lib::error_code m_ec;
1509-
1512+
15101513
/// A flag that gets set once it is determined that the connection is an
15111514
/// HTTP connection and not a WebSocket one.
15121515
bool m_is_http;

0 commit comments

Comments
 (0)