tests fixed gcc warnings

This commit is contained in:
silverqx
2023-05-06 15:49:15 +02:00
parent 29275a7d33
commit 9ac6f1bbc5
2 changed files with 12 additions and 12 deletions
@@ -1716,13 +1716,13 @@ void tst_Collection_Models::tap_lvalue() const
ModelsCollection<AlbumImage> &result =
images.tap([&callbackInvoked, &imagesInCallbackAddress]
(ModelsCollection<AlbumImage> &images)
(ModelsCollection<AlbumImage> &images_)
{
callbackInvoked = true;
imagesInCallbackAddress = reinterpret_cast<uintptr_t>(&images);
imagesInCallbackAddress = reinterpret_cast<uintptr_t>(&images_);
// Change the name, append " NEW"
auto &image4 = images[2];
auto &image4 = images_[2];
image4[NAME] = SPACE_IN.arg(image4.getAttribute(NAME).template value<QString>(),
QStringLiteral("NEW"));
});
@@ -1754,12 +1754,12 @@ void tst_Collection_Models::tap_rvalue() const
ModelsCollection<AlbumImage> result =
std::move(imagesInit).tap([&callbackInvoked]
(ModelsCollection<AlbumImage> &images)
(ModelsCollection<AlbumImage> &images_)
{
callbackInvoked = true;
// Change the name, append " NEW"
auto &image2 = images.first();
auto &image2 = images_.first();
image2[NAME] = SPACE_IN.arg(image2.getAttribute(NAME).template value<QString>(),
QStringLiteral("NEW"));
});
@@ -2101,13 +2101,13 @@ void tst_Collection_Relations::tap_lvalue() const
ModelsCollection<AlbumImage *> &result =
images.tap([&callbackInvoked, &imagesInCallbackAddress]
(ModelsCollection<AlbumImage *> &images)
(ModelsCollection<AlbumImage *> &images_)
{
callbackInvoked = true;
imagesInCallbackAddress = reinterpret_cast<uintptr_t>(&images);
imagesInCallbackAddress = reinterpret_cast<uintptr_t>(&images_);
// Change the name, append " NEW"
auto &image4 = *images.at(2);
auto &image4 = *images_.at(2);
image4[NAME] = SPACE_IN.arg(image4.getAttribute(NAME).template value<QString>(),
QStringLiteral("NEW"));
});
@@ -2138,14 +2138,14 @@ void tst_Collection_Relations::tap_rvalue() const
ModelsCollection<AlbumImage *> result =
std::move(imagesInit).tap([&callbackInvoked]
(ModelsCollection<AlbumImage *> &images)
(ModelsCollection<AlbumImage *> &images_)
{
callbackInvoked = true;
// Change the name, append " NEW"
auto &image2 = *images.first();
image2[NAME] = SPACE_IN.arg(image2.getAttribute(NAME).template value<QString>(),
QStringLiteral("NEW"));
auto &image2_ = *images_.first();
image2_[NAME] = SPACE_IN.arg(image2_.getAttribute(NAME).template value<QString>(),
QStringLiteral("NEW"));
});
// Verify