Skip to content
Permalink
Browse files

fix local variable will be copied despite being returned by name (#8157)

this is an error with clang 7
note: call 'std::move' explicitly to avoid copying
  • Loading branch information
3nids committed Oct 10, 2018
1 parent b80c95c commit 94a7d9db66688dc97afdfed3406b64d9b669539e
Showing with 4 additions and 3 deletions.
  1. +1 −1 external/o2/src/o2replyserver.cpp
  2. +3 −2 src/plugins/grass/qtermwidget/ColorScheme.cpp
@@ -105,7 +105,7 @@ QMap<QString, QString> O2ReplyServer::parseQueryParams(QByteArray *data) {
QString value = QUrl::fromPercentEncoding(QByteArray().append(tokenPair.second.trimmed().toLatin1()));
queryParams.insert(key, value);
}
return queryParams;
return std::move( queryParams );
}

void O2ReplyServer::closeServer(QTcpSocket *socket, bool hasparameters)
@@ -33,6 +33,7 @@
#include <QtDebug>
#include <QSettings>
#include <QDir>
#include <QStringList>


// KDE
@@ -698,7 +699,7 @@ QList<QString> ColorSchemeManager::listKDE3ColorSchemes()
QStringList ret;
foreach ( QString i, list )
ret << dname + "/" + i;
return ret;
return std::move( ret );
//return KGlobal::dirs()->findAllResources("data",
// "konsole/*.schema",
// KStandardDirs::NoDuplicates);
@@ -715,7 +716,7 @@ QList<QString> ColorSchemeManager::listColorSchemes()
QStringList ret;
foreach ( QString i, list )
ret << dname + "/" + i;
return ret;
return std::move( ret );
// return KGlobal::dirs()->findAllResources("data",
// "konsole/*.colorscheme",
// KStandardDirs::NoDuplicates);

0 comments on commit 94a7d9d

Please sign in to comment.
You can’t perform that action at this time.