mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix -Wredundant-move and -Wdeprecated-copy warnings (#6663)
* Do not move result at end of function This makes GCC 9.1.2 happy with the active -Wredundant-move warning. Indeed, such moving of local variables or local arguments before returning is unnecessary and prevents the compiler from copy elision optimization.
This commit is contained in:
committed by
John Preston
parent
a196b0aba7
commit
793862bee6
@@ -1786,7 +1786,7 @@ std::unique_ptr<PeerListRow> ParticipantsBoxController::createRow(
|
||||
row->setActionLink(tr::lng_profile_kick(tr::now));
|
||||
}
|
||||
}
|
||||
return std::move(row);
|
||||
return row;
|
||||
}
|
||||
|
||||
auto ParticipantsBoxController::computeType(
|
||||
@@ -1931,7 +1931,7 @@ auto ParticipantsBoxSearchController::saveState() const
|
||||
result->offset = _offset;
|
||||
result->allLoaded = _allLoaded;
|
||||
result->wasLoading = (_requestId != 0);
|
||||
return std::move(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void ParticipantsBoxSearchController::restoreState(
|
||||
|
Reference in New Issue
Block a user