mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Меняем тип переменной с элементами на list для ускорения операций удаления эдементов спсика
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
extern IoTGpio IoTgpio;
|
||||
|
||||
std::vector<IoTItem*> IoTItems;
|
||||
std::list<IoTItem*> IoTItems;
|
||||
void* getAPI(String subtype, String params);
|
||||
|
||||
void configure(String path) {
|
||||
@@ -38,8 +38,8 @@ void configure(String path) {
|
||||
|
||||
void clearConfigure() {
|
||||
Serial.printf("Start clearing config\n");
|
||||
for (unsigned int i = 0; i < IoTItems.size(); i++) {
|
||||
if (IoTItems[i]) delete IoTItems[i];
|
||||
for (std::list<IoTItem*>::iterator it=IoTItems.begin(); it != IoTItems.end(); ++it) {
|
||||
if (*it) delete *it;
|
||||
}
|
||||
IoTItems.clear();
|
||||
}
|
||||
Reference in New Issue
Block a user