JNI: Don't use forwarding reference in ranged for
The elements we iterate over are always jobjects, i.e. POD, so iterating over values is at least as efficient, and less unnecessarily clever. Change-Id: I6142dab84f3d37d82613ecf27cc03dde7810e541 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> (cherry picked from commit 9f0dc59cd62f7afd18b36e6064f2d4b8ff2a7c6c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
ac399ca897
commit
6925dcbf79
@ -300,7 +300,7 @@ public:
|
||||
if constexpr (std::is_same_v<T, jobject>) {
|
||||
QList<jobject> res;
|
||||
res.reserve(size());
|
||||
for (auto &&element : *this)
|
||||
for (auto element : *this)
|
||||
res.append(element);
|
||||
return res;
|
||||
} else if constexpr (std::is_same_v<T, jbyte>) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user