cleanup: silence std::move()-related Coverity warnings

Unfortunately Coverity doesn't understand that most Qt data
structures are copy-on-write. It's a mis-feature of Qt, but
it is the way it is. Thus, passing by value is not an issue.

Out of ca. 25 warnings only two were legit. Let's silence
the others by either std::move()ing or passing by reference,
as would be idiomatic C++, which Qt is not.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-01-15 21:22:20 +01:00 committed by Dirk Hohndel
parent ac0d44bccf
commit 8a3a0edb83
22 changed files with 39 additions and 38 deletions

View file

@ -83,7 +83,7 @@ static std::vector<PictureListForAddition> removePictures(std::vector<PictureLis
if (!toAdd.pics.empty())
res.push_back(toAdd);
invalidate_dive_cache(list.d);
emit diveListNotifier.picturesRemoved(list.d, filenames);
emit diveListNotifier.picturesRemoved(list.d, std::move(filenames));
}
picturesToRemove.clear();
return res;