forked from qt-creator/qt-creator
ProjectExplorer: Fix compiler warning
warning: local variable 'task' will be copied despite being returned by name [-Wreturn-std-move] NRVO doesn't happen because "CompileTask" isn't the same type as the return value "Task". Change-Id: Ic9c6388d4667cd68dbbba98b6b98721c4d4fb557 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -80,7 +80,7 @@ static Task handleNmakeJomMessage(const QString &line)
|
||||
|
||||
CompileTask task(Task::Error, line.mid(matchLength).trimmed());
|
||||
task.details << line;
|
||||
return task;
|
||||
return std::move(task);
|
||||
}
|
||||
|
||||
static Task::TaskType taskType(const QString &category)
|
||||
|
Reference in New Issue
Block a user