forked from qt-creator/qt-creator
Fix warning: "Don't call QVector::first() on temporary QList/QVector"
[-Wclazy-detaching-temporary] Change-Id: I23f5cbd80bb92d3f9f1bfb5ae07493818958c5b0 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -393,9 +393,9 @@ bool Semantic::visit(FunctionCallExpressionAST *ast)
|
||||
// ### error, unresolved call.
|
||||
Q_ASSERT(! overloads->functions().isEmpty());
|
||||
|
||||
_expr.type = overloads->functions().first()->returnType();
|
||||
_expr.type = overloads->functions().constFirst()->returnType();
|
||||
} else {
|
||||
_expr.type = candidates.first()->returnType();
|
||||
_expr.type = candidates.constFirst()->returnType();
|
||||
|
||||
if (candidates.size() != 1) {
|
||||
// ### error, ambiguous call
|
||||
|
||||
Reference in New Issue
Block a user