1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-29 16:42:19 +01:00

Activate owning-memory clang-tidy check (#1891)

* Activate owning-memory clang-tidy check

* Lint

* Lint

* Fix issue with new NfcTag constructor

* Update pointers for number and select

* Add back the NOLINT to display buffer

* Fix merge

* DSMR fixes

* Nextion fixes

* Fix pipsolar

* Fix lwip socket

* Format

* Change socket fix

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Otto Winter
2021-09-13 11:31:02 +02:00
committed by GitHub
parent e0cff214b2
commit a4867a00ea
75 changed files with 293 additions and 321 deletions

View File

@@ -423,9 +423,9 @@ class LWIPRawImpl : public Socket {
// nothing to do here, we just don't push it to the queue
return ERR_OK;
}
auto *sock = new LWIPRawImpl(newpcb);
auto sock = std::unique_ptr<LWIPRawImpl>(new LWIPRawImpl(newpcb));
sock->init();
accepted_sockets_.emplace(sock);
accepted_sockets_.push(std::move(sock));
return ERR_OK;
}
void err_fn(err_t err) {
@@ -486,7 +486,7 @@ std::unique_ptr<Socket> socket(int domain, int type, int protocol) {
auto *pcb = tcp_new();
if (pcb == nullptr)
return nullptr;
auto *sock = new LWIPRawImpl(pcb);
auto *sock = new LWIPRawImpl(pcb); // NOLINT(cppcoreguidelines-owning-memory)
sock->init();
return std::unique_ptr<Socket>{sock};
}