Fixed currentUpdatedHandlerId variable appearing multiple times in several build units. (#120)

* Fixed currentUpdatedHandlerId variable appearing multiple times in several build units
This commit is contained in:
kasedy 2020-05-21 12:55:22 -07:00 committed by GitHub
parent 0e2124062f
commit 13f97b630f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1,3 @@
#include <StatefulService.h>
update_handler_id_t StateUpdateHandlerInfo::currentUpdatedHandlerId = 0;

View File

@ -14,9 +14,9 @@
typedef size_t update_handler_id_t;
typedef std::function<void(const String& originId)> StateUpdateCallback;
static update_handler_id_t currentUpdatedHandlerId;
typedef struct StateUpdateHandlerInfo {
static update_handler_id_t currentUpdatedHandlerId;
update_handler_id_t _id;
StateUpdateCallback _cb;
bool _allowRemove;