diff options
Diffstat (limited to 'lib/connectiondata.cpp')
-rw-r--r-- | lib/connectiondata.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/connectiondata.cpp b/lib/connectiondata.cpp index 513e497e..c157565f 100644 --- a/lib/connectiondata.cpp +++ b/lib/connectiondata.cpp @@ -23,8 +23,11 @@ using namespace QMatrixClient; -struct ConnectionData::Private { - explicit Private(const QUrl& url) : baseUrl(url) {} +struct ConnectionData::Private +{ + explicit Private(QUrl url) + : baseUrl(std::move(url)) + {} QUrl baseUrl; QByteArray accessToken; @@ -36,9 +39,8 @@ struct ConnectionData::Private { }; ConnectionData::ConnectionData(QUrl baseUrl) - : d(std::make_unique<Private>(baseUrl)) -{ -} + : d(std::make_unique<Private>(std::move(baseUrl))) +{} ConnectionData::~ConnectionData() = default; @@ -86,11 +88,10 @@ QString ConnectionData::lastEvent() const { return d->lastEvent; } void ConnectionData::setLastEvent(QString identifier) { - d->lastEvent = identifier; + d->lastEvent = std::move(identifier); } QByteArray ConnectionData::generateTxnId() const { - return QByteArray::number(d->id) + 'q' - + QByteArray::number(++d->txnCounter); + return QByteArray::number(d->id) + 'q' + QByteArray::number(++d->txnCounter); } |