File tree 3 files changed +14
-13
lines changed
3 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -54,12 +54,6 @@ class UsermodAHT10 : public Usermod
54
54
_lastTemperature = 0 ;
55
55
}
56
56
57
- ~UsermodAHT10 ()
58
- {
59
- delete _aht;
60
- _aht = nullptr ;
61
- }
62
-
63
57
#ifndef WLED_DISABLE_MQTT
64
58
void mqttInitialize ()
65
59
{
@@ -322,6 +316,12 @@ class UsermodAHT10 : public Usermod
322
316
_initDone = true ;
323
317
return configComplete;
324
318
}
319
+
320
+ ~UsermodAHT10 ()
321
+ {
322
+ delete _aht;
323
+ _aht = nullptr ;
324
+ }
325
325
};
326
326
327
327
const char UsermodAHT10::_name[] PROGMEM = " AHTxx" ;
Original file line number Diff line number Diff line change @@ -210,12 +210,6 @@ class UsermodINA226 : public Usermod
210
210
}
211
211
}
212
212
213
- ~UsermodINA226 ()
214
- {
215
- delete _ina226;
216
- _ina226 = nullptr ;
217
- }
218
-
219
213
#ifndef WLED_DISABLE_MQTT
220
214
void mqttInitialize ()
221
215
{
@@ -551,6 +545,13 @@ class UsermodINA226 : public Usermod
551
545
_initDone = true ;
552
546
return configComplete;
553
547
}
548
+
549
+ ~UsermodINA226 ()
550
+ {
551
+ delete _ina226;
552
+ _ina226 = nullptr ;
553
+ }
554
+
554
555
};
555
556
556
557
const char UsermodINA226::_name[] PROGMEM = " INA226" ;
Original file line number Diff line number Diff line change @@ -159,5 +159,5 @@ inline void UsermodMqttSwitch::updateState(uint8_t pinNr)
159
159
}
160
160
161
161
162
- static UsermodMqttSwitc mqtt_switch_v2;
162
+ static UsermodMqttSwitch mqtt_switch_v2;
163
163
REGISTER_USERMOD (mqtt_switch_v2);
You can’t perform that action at this time.
0 commit comments