modernize: Pass arguments by value and move in constructors
[quassel.git] / src / core / ctcpparser.h
index f5e5860..9630f6c 100644 (file)
@@ -22,6 +22,7 @@
 #define CTCPPARSER_H
 
 #include <QUuid>
+#include <utility>
 
 #include "corenetwork.h"
 #include "eventmanager.h"
@@ -36,7 +37,7 @@ class CtcpParser : public QObject
     Q_OBJECT
 
 public:
-    CtcpParser(CoreSession *coreSession, QObject *parent = 0);
+    CtcpParser(CoreSession *coreSession, QObject *parent = nullptr);
 
     inline CoreSession *coreSession() const { return _coreSession; }
 
@@ -88,8 +89,8 @@ private:
         QString bufferName;
         QList<QByteArray> replies;
 
-        CtcpReply() : network(0) {}
-        CtcpReply(CoreNetwork *net, const QString &buf) : network(net), bufferName(buf) {}
+        CtcpReply() : network(nullptr) {}
+        CtcpReply(CoreNetwork *net, QString buf) : network(net), bufferName(std::move(buf)) {}
     };
 
     QHash<QUuid, CtcpReply> _replies;