modernize: Use auto where the type is clear from context
[quassel.git] / src / client / client.cpp
index 3c455ae..f6e8d24 100644 (file)
@@ -222,7 +222,7 @@ void Client::coreNetworkCreated(NetworkId id)
         qWarning() << "Creation of already existing network requested!";
         return;
     }
-    Network *net = new Network(id, this);
+    auto *net = new Network(id, this);
     addNetwork(net);
 }
 
@@ -283,7 +283,7 @@ void Client::removeIdentity(IdentityId id)
 void Client::coreIdentityCreated(const Identity &other)
 {
     if (!_identities.contains(other.id())) {
-        Identity *identity = new Identity(other, this);
+        auto *identity = new Identity(other, this);
         _identities[other.id()] = identity;
         identity->setInitialized();
         signalProxy()->synchronize(identity);
@@ -557,7 +557,7 @@ void Client::setDisconnectedFromCore()
 
 void Client::networkDestroyed()
 {
-    Network *net = static_cast<Network *>(sender());
+    auto *net = static_cast<Network *>(sender());
     QHash<NetworkId, Network *>::iterator netIter = _networks.begin();
     while (netIter != _networks.end()) {
         if (*netIter == net) {