File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
libs/websocketpp/websocketpp/transport/asio Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -136,8 +136,8 @@ Please read the leading comments before using the class.
136
136
#define NEEDS_NULLPTR_DEFINED 0
137
137
#endif
138
138
#else
139
- // Let everything else trigger based on whether we have nullptr_t
140
- #if defined nullptr_t
139
+ // Let everything else trigger based on whether we use c++11 or above
140
+ #if __cplusplus >= 201103L
141
141
#define NEEDS_NULLPTR_DEFINED 0
142
142
#else
143
143
#define NEEDS_NULLPTR_DEFINED 1
Original file line number Diff line number Diff line change @@ -442,8 +442,8 @@ class connection : public config::socket_type::socket_con_type {
442
442
if (ec) {
443
443
// reset the handlers to break the circular reference:
444
444
// this->handler->this
445
- m_async_read_handler = _WEBSOCKETPP_NULLPTR_TOKEN_ ;
446
- m_async_write_handler = _WEBSOCKETPP_NULLPTR_TOKEN_ ;
445
+ m_async_read_handler = async_read_handler{} ;
446
+ m_async_write_handler = async_write_handler{} ;
447
447
}
448
448
449
449
return ec;
@@ -969,12 +969,12 @@ class connection : public config::socket_type::socket_con_type {
969
969
// Reset cached handlers now that we won't be reading or writing anymore
970
970
// These cached handlers store shared pointers to this connection and
971
971
// will leak the connection if not destroyed.
972
- m_async_read_handler = _WEBSOCKETPP_NULLPTR_TOKEN_ ;
973
- m_async_write_handler = _WEBSOCKETPP_NULLPTR_TOKEN_ ;
974
- m_init_handler = _WEBSOCKETPP_NULLPTR_TOKEN_ ;
972
+ m_async_read_handler = async_read_handler{} ;
973
+ m_async_write_handler = async_write_handler{} ;
974
+ m_init_handler = init_handler{} ;
975
975
976
- m_read_handler = _WEBSOCKETPP_NULLPTR_TOKEN_ ;
977
- m_write_handler = _WEBSOCKETPP_NULLPTR_TOKEN_ ;
976
+ m_read_handler = read_handler{} ;
977
+ m_write_handler = write_handler{} ;
978
978
979
979
timer_ptr shutdown_timer;
980
980
shutdown_timer = set_timer (
You can’t perform that action at this time.
0 commit comments