forked from qt-creator/qt-creator
LSP: Avoid unneeded copy inside loop
Change-Id: I7c4d61eda6caf0baacdde01392e2457d54286863 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
David Schulz
parent
d07d75a08a
commit
90e432aa05
@@ -396,7 +396,7 @@ CodeActionResult::CodeActionResult(const QJsonValue &val)
|
|||||||
{
|
{
|
||||||
using ResultArray = QList<Utils::variant<Command, CodeAction>>;
|
using ResultArray = QList<Utils::variant<Command, CodeAction>>;
|
||||||
if (val.isArray()) {
|
if (val.isArray()) {
|
||||||
QJsonArray array = val.toArray();
|
const QJsonArray array = val.toArray();
|
||||||
ResultArray result;
|
ResultArray result;
|
||||||
for (const QJsonValue &val : array) {
|
for (const QJsonValue &val : array) {
|
||||||
Command command(val);
|
Command command(val);
|
||||||
|
Reference in New Issue
Block a user