From b67a262cfded362df60164ab3e02eccdee63edd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=BCbach=2C=20Lukas?= Date: Fri, 28 Nov 2025 22:36:00 +0100 Subject: [PATCH] [Fix-Warnings] Replace types with auto for libcockatrice/network/ files --- .../src/client/network/update/client/release_channel.cpp | 6 +++--- .../libcockatrice/network/server/local/local_server.cpp | 2 +- .../libcockatrice/network/server/remote/server.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cockatrice/src/client/network/update/client/release_channel.cpp b/cockatrice/src/client/network/update/client/release_channel.cpp index 9edfe7caf..319b5e002 100644 --- a/cockatrice/src/client/network/update/client/release_channel.cpp +++ b/cockatrice/src/client/network/update/client/release_channel.cpp @@ -151,7 +151,7 @@ void StableReleaseChannel::releaseListFinished() } QString shortHash = lastRelease->getCommitHash().left(GIT_SHORT_HASH_LEN); - QString myHash = QString(VERSION_COMMIT); + auto myHash = QString(VERSION_COMMIT); qCInfo(ReleaseChannelLog) << "Current hash=" << myHash << "update hash=" << shortHash; qCInfo(ReleaseChannelLog) << "Got reply from release server, name=" << lastRelease->getName() @@ -188,7 +188,7 @@ void StableReleaseChannel::tagListFinished() qCInfo(ReleaseChannelLog) << "Got reply from tag server, commit=" << lastRelease->getCommitHash(); QString shortHash = lastRelease->getCommitHash().left(GIT_SHORT_HASH_LEN); - QString myHash = QString(VERSION_COMMIT); + auto myHash = QString(VERSION_COMMIT); qCInfo(ReleaseChannelLog) << "Current hash=" << myHash << "update hash=" << shortHash; const bool needToUpdate = (QString::compare(shortHash, myHash, Qt::CaseInsensitive) != 0); @@ -281,7 +281,7 @@ void BetaReleaseChannel::fileListFinished() QVariantList resultList = jsonResponse.toVariant().toList(); QString shortHash = lastRelease->getCommitHash().left(GIT_SHORT_HASH_LEN); - QString myHash = QString(VERSION_COMMIT); + auto myHash = QString(VERSION_COMMIT); qCInfo(ReleaseChannelLog) << "Current hash=" << myHash << "update hash=" << shortHash; bool needToUpdate = (QString::compare(shortHash, myHash, Qt::CaseInsensitive) != 0); diff --git a/libcockatrice_network/libcockatrice/network/server/local/local_server.cpp b/libcockatrice_network/libcockatrice/network/server/local/local_server.cpp index 8f9d82aa4..c539c9449 100644 --- a/libcockatrice_network/libcockatrice/network/server/local/local_server.cpp +++ b/libcockatrice_network/libcockatrice/network/server/local/local_server.cpp @@ -22,7 +22,7 @@ LocalServer::~LocalServer() LocalServerInterface *LocalServer::newConnection() { - LocalServerInterface *lsi = new LocalServerInterface(this, getDatabaseInterface()); + auto *lsi = new LocalServerInterface(this, getDatabaseInterface()); addClient(lsi); return lsi; } diff --git a/libcockatrice_network/libcockatrice/network/server/remote/server.cpp b/libcockatrice_network/libcockatrice/network/server/remote/server.cpp index 2f1232b8f..18a5cecfc 100644 --- a/libcockatrice_network/libcockatrice/network/server/remote/server.cpp +++ b/libcockatrice_network/libcockatrice/network/server/remote/server.cpp @@ -286,7 +286,7 @@ void Server::externalUserJoined(const ServerInfo_User &userInfo) // This function is always called from the main thread via signal/slot. clientsLock.lockForWrite(); - Server_RemoteUserInterface *newUser = new Server_RemoteUserInterface(this, ServerInfo_User_Container(userInfo)); + auto *newUser = new Server_RemoteUserInterface(this, ServerInfo_User_Container(userInfo)); externalUsers.insert(QString::fromStdString(userInfo.name()), newUser); externalUsersBySessionId.insert(userInfo.session_id(), newUser);