qarraydataops.h: Pass initializer_list by value in copyRanges
initializer_list is supposed to be cheap to copy, and passing by value will avoid one further indirection (though the compiler can probably see through it, anyway). Pick-to: 6.5 Change-Id: I8ffbf5de4d8cf2c85f4cff76ef63d6cdeac4db5a Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
aaa198cb5c
commit
1d43cbfede
@ -215,7 +215,7 @@ public:
|
||||
|
||||
struct Span { T *begin; T *end; };
|
||||
|
||||
void copyRanges(const std::initializer_list<Span> &ranges)
|
||||
void copyRanges(std::initializer_list<Span> ranges)
|
||||
{
|
||||
auto it = this->begin();
|
||||
std::for_each(ranges.begin(), ranges.end(), [&it](const auto &span) {
|
||||
|
Loading…
Reference in New Issue
Block a user