From b53fcb2c3db63b8eb8c9cac81caa1592da7fe2b4 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 16 Jan 2019 12:08:02 -0800 Subject: [PATCH 1/2] Pass udt::Socket pointer in initializer-list for udt::Connection --- libraries/networking/src/udt/Connection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/Connection.cpp b/libraries/networking/src/udt/Connection.cpp index 418dc8f417..e54e1396fd 100644 --- a/libraries/networking/src/udt/Connection.cpp +++ b/libraries/networking/src/udt/Connection.cpp @@ -33,7 +33,8 @@ using namespace std::chrono; Connection::Connection(Socket* parentSocket, HifiSockAddr destination, std::unique_ptr congestionControl) : _parentSocket(parentSocket), _destination(destination), - _congestionControl(move(congestionControl)) + _congestionControl(move(congestionControl)), + QObject(parentSocket) { Q_ASSERT_X(parentSocket, "Connection::Connection", "Must be called with a valid Socket*"); From 024cb70fce051d76fdb3c90f0a9cd2b4c76d39b7 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 16 Jan 2019 12:58:13 -0800 Subject: [PATCH 2/2] Change member-initializer order to fix warnings --- libraries/networking/src/udt/Connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/udt/Connection.cpp b/libraries/networking/src/udt/Connection.cpp index e54e1396fd..7ab2296935 100644 --- a/libraries/networking/src/udt/Connection.cpp +++ b/libraries/networking/src/udt/Connection.cpp @@ -31,10 +31,10 @@ using namespace udt; using namespace std::chrono; Connection::Connection(Socket* parentSocket, HifiSockAddr destination, std::unique_ptr congestionControl) : + QObject(parentSocket), _parentSocket(parentSocket), _destination(destination), - _congestionControl(move(congestionControl)), - QObject(parentSocket) + _congestionControl(move(congestionControl)) { Q_ASSERT_X(parentSocket, "Connection::Connection", "Must be called with a valid Socket*");