diff --git a/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h b/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h index 72fabec58d..d4723ed889 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h +++ b/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h @@ -72,7 +72,7 @@ class AsyncNotifySocketCallbacks { public: virtual void AsyncNotifySocketConnectFailed(plNetAddress remoteAddr) = 0; - virtual bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, plNetAddress localAddr, plNetAddress remoteAddr) = 0; + virtual bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, const plNetAddress& localAddr, const plNetAddress& remoteAddr) = 0; virtual void AsyncNotifySocketDisconnect(AsyncSocket sock) = 0; virtual std::optional AsyncNotifySocketRead(AsyncSocket sock, uint8_t* buffer, size_t bytes) = 0; }; diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp index 5faf02c1cd..e2d1c66421 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp @@ -75,7 +75,7 @@ struct CliAuConn : hsRefCnt, AsyncNotifySocketCallbacks { // Callbacks void AsyncNotifySocketConnectFailed(plNetAddress remoteAddr) override; - bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, plNetAddress localAddr, plNetAddress remoteAddr) override; + bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, const plNetAddress& localAddr, const plNetAddress& remoteAddr) override; void AsyncNotifySocketDisconnect(AsyncSocket sock) override; std::optional AsyncNotifySocketRead(AsyncSocket sock, uint8_t* buffer, size_t bytes) override; @@ -1361,7 +1361,7 @@ static void SendClientRegisterRequest (CliAuConn * conn) { } //============================================================================ -bool CliAuConn::AsyncNotifySocketConnectSuccess(AsyncSocket sock, plNetAddress localAddr, plNetAddress remoteAddr) +bool CliAuConn::AsyncNotifySocketConnectSuccess(AsyncSocket sock, const plNetAddress& localAddr, const plNetAddress& remoteAddr) { bool wasAbandoned; { @@ -4676,7 +4676,7 @@ void NetCliAuthStartConnect ( for (unsigned i = 0; i < authAddrCount; ++i) { // Do we need to lookup the address? - ST::string name = authAddrList[i]; + const ST::string& name = authAddrList[i]; const char* pos; for (pos = name.begin(); pos != name.end(); ++pos) { if (!(isdigit(*pos) || *pos == '.' || *pos == ':')) { diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp index 4d37cdcf9b..56fc0d14d3 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp @@ -101,7 +101,7 @@ struct CliFileConn : hsRefCnt, AsyncNotifySocketCallbacks { // Callbacks void AsyncNotifySocketConnectFailed(plNetAddress remoteAddr) override; - bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, plNetAddress localAddr, plNetAddress remoteAddr) override; + bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, const plNetAddress& localAddr, const plNetAddress& remoteAddr) override; void AsyncNotifySocketDisconnect(AsyncSocket sock) override; std::optional AsyncNotifySocketRead(AsyncSocket sock, uint8_t* buffer, size_t bytes) override; @@ -308,7 +308,7 @@ static void AbandonConn(CliFileConn* conn) { } //============================================================================ -bool CliFileConn::AsyncNotifySocketConnectSuccess(AsyncSocket sock, plNetAddress localAddr, plNetAddress remoteAddr) +bool CliFileConn::AsyncNotifySocketConnectSuccess(AsyncSocket sock, const plNetAddress& localAddr, const plNetAddress& remoteAddr) { { hsLockGuard(s_critsect); @@ -1300,7 +1300,7 @@ void NetCliFileStartConnect ( for (unsigned i = 0; i < fileAddrCount; ++i) { // Do we need to lookup the address? - ST::string name = fileAddrList[i]; + const ST::string& name = fileAddrList[i]; const char* pos; for (pos = name.begin(); pos != name.end(); ++pos) { if (!(isdigit(*pos) || *pos == '.' || *pos == ':')) { diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp index 9dfd19d847..696a051492 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp @@ -73,7 +73,7 @@ struct CliGmConn : hsRefCnt, AsyncNotifySocketCallbacks { // Callbacks void AsyncNotifySocketConnectFailed(plNetAddress remoteAddr) override; - bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, plNetAddress localAddr, plNetAddress remoteAddr) override; + bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, const plNetAddress& localAddr, const plNetAddress& remoteAddr) override; void AsyncNotifySocketDisconnect(AsyncSocket sock) override; std::optional AsyncNotifySocketRead(AsyncSocket sock, uint8_t* buffer, size_t bytes) override; @@ -212,7 +212,7 @@ static void AbandonConn(CliGmConn* conn) { } //============================================================================ -bool CliGmConn::AsyncNotifySocketConnectSuccess(AsyncSocket sock, plNetAddress localAddr, plNetAddress remoteAddr) +bool CliGmConn::AsyncNotifySocketConnectSuccess(AsyncSocket sock, const plNetAddress& localAddr, const plNetAddress& remoteAddr) { bool wasAbandoned; { diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp index 13fddc6f66..3618535380 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp @@ -70,7 +70,7 @@ struct CliGkConn : hsRefCnt, AsyncNotifySocketCallbacks { // Callbacks void AsyncNotifySocketConnectFailed(plNetAddress remoteAddr) override; - bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, plNetAddress localAddr, plNetAddress remoteAddr) override; + bool AsyncNotifySocketConnectSuccess(AsyncSocket sock, const plNetAddress& localAddr, const plNetAddress& remoteAddr) override; void AsyncNotifySocketDisconnect(AsyncSocket sock) override; std::optional AsyncNotifySocketRead(AsyncSocket sock, uint8_t* buffer, size_t bytes) override; @@ -242,7 +242,7 @@ static void AbandonConn(CliGkConn* conn) { } //============================================================================ -bool CliGkConn::AsyncNotifySocketConnectSuccess(AsyncSocket sock, plNetAddress localAddr, plNetAddress remoteAddr) +bool CliGkConn::AsyncNotifySocketConnectSuccess(AsyncSocket sock, const plNetAddress& localAddr, const plNetAddress& remoteAddr) { bool wasAbandoned; { @@ -906,7 +906,7 @@ void NetCliGateKeeperStartConnect ( for (unsigned i = 0; i < gateKeeperAddrCount; ++i) { // Do we need to lookup the address? - ST::string name = gateKeeperAddrList[i]; + const ST::string& name = gateKeeperAddrList[i]; const char* pos; for (pos = name.begin(); pos != name.end(); ++pos) { if (!(isdigit(*pos) || *pos == '.' || *pos == ':')) {