build: switch to C++20
Signed-off-by: Deepak Kodihalli <deepak.kodihalli.83@gmail.com>
Change-Id: I514e8210bfcc4c4546720de19b151d9a4dae1fc5
diff --git a/softoff/softoff.cpp b/softoff/softoff.cpp
index a704885..2091fca 100644
--- a/softoff/softoff.cpp
+++ b/softoff/softoff.cpp
@@ -350,7 +350,8 @@
}
// Add a timer to the event loop, default 30s.
- auto timerCallback = [=](Timer& /*source*/, Timer::TimePoint /*time*/) {
+ auto timerCallback = [=, this](Timer& /*source*/,
+ Timer::TimePoint /*time*/) {
if (!responseReceived)
{
std::cerr << "PLDM soft off: ERROR! Can't get the response for the "
@@ -364,7 +365,7 @@
std::chrono::seconds{1}, std::move(timerCallback));
// Add a callback to handle EPOLLIN on fd
- auto callback = [=](IO& io, int fd, uint32_t revents) {
+ auto callback = [=, this](IO& io, int fd, uint32_t revents) {
if (!(revents & EPOLLIN))
{
return;