From 3ac3f0406fd355740d9247fc172e9f54b4145021 Mon Sep 17 00:00:00 2001 From: Nisarg Jhaveri Date: Fri, 21 Jun 2024 14:22:31 +0530 Subject: [PATCH] Try fixing clang-tidy issues --- esphome/components/waveshare_epaper/waveshare_4_24in.cpp | 6 +++--- esphome/components/waveshare_epaper/waveshare_epaper.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/waveshare_epaper/waveshare_4_24in.cpp b/esphome/components/waveshare_epaper/waveshare_4_24in.cpp index f54b2fb73a..858d962575 100644 --- a/esphome/components/waveshare_epaper/waveshare_4_24in.cpp +++ b/esphome/components/waveshare_epaper/waveshare_4_24in.cpp @@ -13,10 +13,10 @@ WaveshareEPaper4P26In::WaveshareEPaper4P26In() : WaveshareEPaper() { reset_durat void WaveshareEPaper4P26In::init_display_async_(bool fast_update, const std::function &&f) { // Reset the display this->reset_(); - wait_until_idle_async_([this, fast_update, f(std::move(f))] { + wait_until_idle_async_([this, fast_update, f] { this->command(0x12); // SWRESET - wait_until_idle_async_([this, fast_update, f(std::move(f))] { + wait_until_idle_async_([this, fast_update, f] { // Use the internal temperature sensor this->command(0x18); this->data(0x80); @@ -66,7 +66,7 @@ void WaveshareEPaper4P26In::init_display_async_(bool fast_update, const std::fun this->data(0x00); if (fast_update) { - this->wait_until_idle_async_([this, f(std::move(f))] { + this->wait_until_idle_async_([this, f] { this->command(0x1A); this->data(0x5A); diff --git a/esphome/components/waveshare_epaper/waveshare_epaper.cpp b/esphome/components/waveshare_epaper/waveshare_epaper.cpp index a5bd3d0a54..0cf3a99c63 100644 --- a/esphome/components/waveshare_epaper/waveshare_epaper.cpp +++ b/esphome/components/waveshare_epaper/waveshare_epaper.cpp @@ -169,7 +169,7 @@ void WaveshareEPaperBase::wait_until_idle_async_(const std::function &&f return f(); } - this->set_timeout(20, [this, f(std::move(f))] { this->wait_until_idle_async_(std::move(f)); }); + this->set_timeout(20, [this, f] { this->wait_until_idle_async_(std::move(f)); }); } void WaveshareEPaperBase::update() {