mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-05-04 23:49:25 -05:00
tests fixed gcc warnings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user