QSharedMemory: fix -Werror=deprecated in C++20 build
Capture of *this by reference in [=] is deprecated in C++20. Use the
perfectly adequate [&] instead.
Amends 0740ab56d7.
Change-Id: I3035a29baf63c22a32aafdcbd4425a3f7b45472f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
parent
ef1059b141
commit
26bb750292
|
|
@ -170,23 +170,23 @@ public:
|
|||
|
||||
bool handle()
|
||||
{
|
||||
return visit([=](auto p) { return !!p->handle(this); });
|
||||
return visit([&](auto p) { return !!p->handle(this); });
|
||||
}
|
||||
bool cleanHandle()
|
||||
{
|
||||
return visit([=](auto p) { return p->cleanHandle(this); });
|
||||
return visit([&](auto p) { return p->cleanHandle(this); });
|
||||
}
|
||||
bool create(qsizetype size)
|
||||
{
|
||||
return visit([=](auto p) { return p->create(this, size); });
|
||||
return visit([&](auto p) { return p->create(this, size); });
|
||||
}
|
||||
bool attach(QSharedMemory::AccessMode mode)
|
||||
{
|
||||
return visit([=](auto p) { return p->attach(this, mode); });
|
||||
return visit([&](auto p) { return p->attach(this, mode); });
|
||||
}
|
||||
bool detach()
|
||||
{
|
||||
return visit([=](auto p) { return p->detach(this); });
|
||||
return visit([&](auto p) { return p->detach(this); });
|
||||
}
|
||||
|
||||
inline void setError(QSharedMemory::SharedMemoryError e, const QString &message)
|
||||
|
|
|
|||
Loading…
Reference in New Issue