Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/application/StarP2PNetworkingService_pc.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-02-20 09:49:42 +1100
committerGitHub <noreply@github.com>2024-02-20 09:49:42 +1100
commitaa987a217779e71f97ee4c9cce531aec1c861bf8 (patch)
treee51fcce110306d93bf93870f13a5ff7d6b575427 /source/application/StarP2PNetworkingService_pc.cpp
parentd0099a6d790b66f21e4e266e569d64fb82fb0a81 (diff)
parent1c89042016c739815b2d70bcbef4673eef6b63e0 (diff)
Merge branch 'main' into small-fixes
Diffstat (limited to 'source/application/StarP2PNetworkingService_pc.cpp')
-rw-r--r--source/application/StarP2PNetworkingService_pc.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/application/StarP2PNetworkingService_pc.cpp b/source/application/StarP2PNetworkingService_pc.cpp
index 0170eb0..f13bb62 100644
--- a/source/application/StarP2PNetworkingService_pc.cpp
+++ b/source/application/StarP2PNetworkingService_pc.cpp
@@ -19,9 +19,9 @@ PcP2PNetworkingService::PcP2PNetworkingService(PcPlatformServicesStatePtr state)
: m_callbackConnectionFailure(this, &PcP2PNetworkingService::steamOnConnectionFailure),
m_callbackJoinRequested(this, &PcP2PNetworkingService::steamOnJoinRequested),
m_callbackSessionRequest(this, &PcP2PNetworkingService::steamOnSessionRequest),
- m_state(move(state)) {
+ m_state(std::move(state)) {
#else
- : m_state(move(state)) {
+ : m_state(std::move(state)) {
#endif
#ifdef STAR_ENABLE_DISCORD_INTEGRATION
@@ -224,7 +224,7 @@ Either<String, P2PSocketUPtr> PcP2PNetworkingService::connectToPeer(P2PNetworkin
if (type == "discord") {
auto remoteUserId = lexicalCast<discord::UserId>(peerId.extract("_"));
auto lobbyId = lexicalCast<discord::LobbyId>(peerId.extract("_"));
- String lobbySecret = move(peerId);
+ String lobbySecret = std::move(peerId);
return makeRight(discordConnectRemote(remoteUserId, lobbyId, lobbySecret));
}
}
@@ -242,7 +242,7 @@ void PcP2PNetworkingService::addPendingJoin(String connectionString) {
if (connectionString.extract(":") != "connect")
throw ApplicationException::format("malformed connection string '{}'", connectionString);
- String target = move(connectionString);
+ String target = std::move(connectionString);
String targetType = target.extract("_");
if (targetType == "address")
@@ -357,7 +357,7 @@ void PcP2PNetworkingService::steamReceiveAll() {
SteamNetworking()->ReadP2PPacket(data.ptr(), messageSize, &messageSize, &messageRemoteUser);
if (auto openSocket = m_steamOpenSockets.value(messageRemoteUser.ConvertToUint64())) {
MutexLocker socketLocker(openSocket->mutex);
- openSocket->incoming.append(move(data));
+ openSocket->incoming.append(std::move(data));
}
}
}
@@ -474,7 +474,7 @@ P2PSocketUPtr PcP2PNetworkingService::discordConnectRemote(discord::UserId remot
}
});
- return unique_ptr<P2PSocket>(move(socket));
+ return unique_ptr<P2PSocket>(std::move(socket));
}
void PcP2PNetworkingService::discordOnReceiveMessage(discord::LobbyId lobbyId, discord::UserId userId, discord::NetworkChannelId channel, uint8_t* data, uint32_t size) {
@@ -507,7 +507,7 @@ void PcP2PNetworkingService::discordOnLobbyMemberConnect(discord::LobbyId lobbyI
socket->mode = DiscordSocketMode::Connected;
m_discordOpenSockets[userId] = socket.get();
- m_pendingIncomingConnections.append(move(socket));
+ m_pendingIncomingConnections.append(std::move(socket));
Logger::info("Accepted new discord connection from remote user {}", userId);
}
}