Implement MeshModule destructor (#5714)

pull/5719/head
Eric Severance 2025-01-01 17:25:01 -08:00 zatwierdzone przez GitHub
rodzic c2c06ed0ad
commit 9f32995d7f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -4,6 +4,7 @@
#include "NodeDB.h"
#include "configuration.h"
#include "modules/RoutingModule.h"
#include <algorithm>
#include <assert.h>
std::vector<MeshModule *> *MeshModule::modules;
@ -29,7 +30,9 @@ void MeshModule::setup() {}
MeshModule::~MeshModule()
{
assert(0); // FIXME - remove from list of modules once someone needs this feature
auto it = std::find(modules->begin(), modules->end(), this);
assert(it != modules->end());
modules->erase(it);
}
meshtastic_MeshPacket *MeshModule::allocAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex,