aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-04-06 17:46:58 +0200
committerShauren <shauren.trinity@gmail.com>2023-04-06 17:46:58 +0200
commit7b310802583a96dd32841bc396a119fca833e2d4 (patch)
tree990da6afe067b13ad0f24e33ed33c15adc5ad55d /src/server/shared
parent74c280da9eac16c5d4a875ff2ea5aa30034ff1dd (diff)
Core/Misc: Modernize code a bit by replacing std::tie with either structured bindings or operator<=>
Diffstat (limited to 'src/server/shared')
-rw-r--r--src/server/shared/Networking/AsyncAcceptor.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/shared/Networking/AsyncAcceptor.h b/src/server/shared/Networking/AsyncAcceptor.h
index e88330ebdba..782fa26f879 100644
--- a/src/server/shared/Networking/AsyncAcceptor.h
+++ b/src/server/shared/Networking/AsyncAcceptor.h
@@ -46,9 +46,10 @@ public:
template<AcceptCallback acceptCallback>
void AsyncAcceptWithCallback()
{
- tcp::socket* socket;
- uint32 threadIndex;
- std::tie(socket, threadIndex) = _socketFactory();
+ auto [tmpSocket, tmpThreadIndex] = _socketFactory();
+ // TODO: get rid of temporary variables (clang 15 cannot handle variables from structured bindings as lambda captures)
+ tcp::socket* socket = tmpSocket;
+ uint32 threadIndex = tmpThreadIndex;
_acceptor.async_accept(*socket, [this, socket, threadIndex](boost::system::error_code error)
{
if (!error)