diff options
author | Jøger Hansegård <joger.hansegard@qt.io> | 2024-01-08 13:39:46 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-01-09 17:55:53 +0000 |
commit | 3a855e93821a9ded3cf00db4e93f2b3443e31ae4 (patch) | |
tree | 4a2e713c8a8d4e9b8ec191bb2f4f609c3bff4e8e | |
parent | 3e5140dc269aa7f57886df8bd1aeb6dcad0462ad (diff) |
Fix CodeChecker warning in qvideotexturehelper
CodeChecker reported warning in qvideotexturehelper.cpp line:638
after commit 70c4bf4c565c3ace547f5cbd0398953fcd1ff4f3
Passing result of std::move() as a const reference argument; no move
will actually happen in
file:src/multimedia/video/qvideotexturehelper.cpp line:638
col:32 subresDesc.setData(std::move(underlyingByteArray));
This patch fixes this issue by not calling std::move.
Pick-to: 6.6 6.5
Change-Id: I04b1fcb4a3e0ce3436f184f4db6ed4b6b512f459
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit 4f6251cc3f20bf95c6727ea0907a4f7f34dae914)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/multimedia/video/qvideotexturehelper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/multimedia/video/qvideotexturehelper.cpp b/src/multimedia/video/qvideotexturehelper.cpp index f91ed3daa..a0a87b24a 100644 --- a/src/multimedia/video/qvideotexturehelper.cpp +++ b/src/multimedia/video/qvideotexturehelper.cpp @@ -631,11 +631,11 @@ static bool updateTextureWithMap(QVideoFrame frame, QRhi *rhi, QRhiResourceUpdat } else { const auto frameBits = reinterpret_cast<const char *>(frame.bits(plane)); const auto mappedBytes = frame.mappedBytes(plane); - auto underlyingByteArray = frame.videoBuffer()->underlyingByteArray(plane); + const auto underlyingByteArray = frame.videoBuffer()->underlyingByteArray(plane); if (underlyingByteArray.size() == mappedBytes) { Q_ASSERT(underlyingByteArray.constData() == frameBits); - subresDesc.setData(std::move(underlyingByteArray)); + subresDesc.setData(underlyingByteArray); } else { subresDesc.setData(QByteArray::fromRawData(frameBits, mappedBytes)); |