mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
replace list with vector (makes no diff)
This commit is contained in:
@@ -33,7 +33,8 @@
|
|||||||
class SecuritySettings {
|
class SecuritySettings {
|
||||||
public:
|
public:
|
||||||
String jwtSecret;
|
String jwtSecret;
|
||||||
std::list<User> users;
|
std::vector<User> users;
|
||||||
|
// std::list<User> users;
|
||||||
|
|
||||||
static void read(SecuritySettings & settings, JsonObject root) {
|
static void read(SecuritySettings & settings, JsonObject root) {
|
||||||
// secret
|
// secret
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <ArduinoJson.h>
|
#include <ArduinoJson.h>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <freertos/FreeRTOS.h>
|
#include <freertos/FreeRTOS.h>
|
||||||
@@ -129,7 +130,8 @@ class StatefulService {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
SemaphoreHandle_t _accessMutex;
|
SemaphoreHandle_t _accessMutex;
|
||||||
std::list<StateUpdateHandlerInfo_t> _updateHandlers;
|
std::vector<StateUpdateHandlerInfo_t> _updateHandlers;
|
||||||
|
// std::list<StateUpdateHandlerInfo_t> _updateHandlers;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ class CustomEntityItem {
|
|||||||
|
|
||||||
class WebCustomEntity {
|
class WebCustomEntity {
|
||||||
public:
|
public:
|
||||||
std::list<CustomEntityItem> customEntityItems;
|
std::vector<CustomEntityItem> customEntityItems;
|
||||||
|
// std::list<CustomEntityItem> customEntityItems;
|
||||||
|
|
||||||
static void read(WebCustomEntity & webEntity, JsonObject root);
|
static void read(WebCustomEntity & webEntity, JsonObject root);
|
||||||
static StateUpdateResult update(JsonObject root, WebCustomEntity & webEntity);
|
static StateUpdateResult update(JsonObject root, WebCustomEntity & webEntity);
|
||||||
@@ -78,7 +79,9 @@ class WebCustomEntityService : public StatefulService<WebCustomEntity> {
|
|||||||
HttpEndpoint<WebCustomEntity> _httpEndpoint;
|
HttpEndpoint<WebCustomEntity> _httpEndpoint;
|
||||||
FSPersistence<WebCustomEntity> _fsPersistence;
|
FSPersistence<WebCustomEntity> _fsPersistence;
|
||||||
|
|
||||||
std::list<CustomEntityItem> * customEntityItems; // pointer to the list of entity items
|
std::vector<CustomEntityItem> * customEntityItems; // pointer to the list of entity items
|
||||||
|
// std::list<CustomEntityItem> * customEntityItems; // pointer to the list of entity items
|
||||||
|
|
||||||
bool ha_registered_ = false;
|
bool ha_registered_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user