clang format all of this

This commit is contained in:
2026-01-02 18:23:09 +01:00
parent 8c83bf9df1
commit 3a9b2647d1
9 changed files with 26 additions and 24 deletions

View File

@@ -52,9 +52,9 @@ void HomeAssistant::event_handler(struct lws* wsi, const enum lws_callback_reaso
if (ha_type == "event") {
json = json["event"];
if(json.contains("a"))
if (json.contains("a"))
state = std::stof(json["a"][entity]["s"].get<std::string>());
if(json.contains("c"))
if (json.contains("c"))
state = std::stof(json["c"][entity]["+"]["s"].get<std::string>());
break;
}
@@ -75,7 +75,7 @@ void HomeAssistant::event_handler(struct lws* wsi, const enum lws_callback_reaso
case LWS_CALLBACK_CLIENT_WRITEABLE: {
/* skip whole callback if there's no tx to send */
if (! tx.empty()) {
if (!tx.empty()) {
const size_t msgLen = LWS_PRE + tx.size();
auto* buf = static_cast<unsigned char*>(malloc(msgLen));
if (buf) {