From 17c20276a9641c31ff7e578e1d54766b79d0942d Mon Sep 17 00:00:00 2001 From: cschwinne Date: Fri, 1 Oct 2021 20:26:23 +0200 Subject: [PATCH] Make sbuff local This should save 4 bytes per ESPAsyncE131 instance --- wled00/src/dependencies/e131/ESPAsyncE131.cpp | 2 +- wled00/src/dependencies/e131/ESPAsyncE131.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/wled00/src/dependencies/e131/ESPAsyncE131.cpp b/wled00/src/dependencies/e131/ESPAsyncE131.cpp index 8ba97106..b4065b06 100644 --- a/wled00/src/dependencies/e131/ESPAsyncE131.cpp +++ b/wled00/src/dependencies/e131/ESPAsyncE131.cpp @@ -101,7 +101,7 @@ void ESPAsyncE131::parsePacket(AsyncUDPPacket _packet) { bool error = false; uint8_t protocol = P_E131; - sbuff = reinterpret_cast(_packet.data()); + e131_packet_t *sbuff = reinterpret_cast(_packet.data()); //E1.31 packet identifier ("ACS-E1.17") if (memcmp(sbuff->acn_id, ESPAsyncE131::ACN_ID, sizeof(sbuff->acn_id))) diff --git a/wled00/src/dependencies/e131/ESPAsyncE131.h b/wled00/src/dependencies/e131/ESPAsyncE131.h index e9ce5c12..4cf522d8 100644 --- a/wled00/src/dependencies/e131/ESPAsyncE131.h +++ b/wled00/src/dependencies/e131/ESPAsyncE131.h @@ -163,7 +163,6 @@ class ESPAsyncE131 { static const uint32_t VECTOR_FRAME = 2; static const uint8_t VECTOR_DMP = 2; - e131_packet_t *sbuff; // Pointer to scratch packet buffer AsyncUDP udp; // AsyncUDP // Internal Initializers