mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
remove obsolete reference to JsonObject
This commit is contained in:
@@ -17,10 +17,10 @@ enum class StateUpdateResult {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
using JsonStateUpdater = std::function<StateUpdateResult(JsonObject & root, T & settings)>;
|
||||
using JsonStateUpdater = std::function<StateUpdateResult(JsonObject root, T & settings)>;
|
||||
|
||||
template <typename T>
|
||||
using JsonStateReader = std::function<void(T & settings, JsonObject & root)>;
|
||||
using JsonStateReader = std::function<void(T & settings, JsonObject root)>;
|
||||
|
||||
typedef size_t update_handler_id_t;
|
||||
typedef std::function<void(const String & originId)> StateUpdateCallback;
|
||||
@@ -81,7 +81,7 @@ class StatefulService {
|
||||
return result;
|
||||
}
|
||||
|
||||
StateUpdateResult update(JsonObject & jsonObject, JsonStateUpdater<T> stateUpdater, const String & originId) {
|
||||
StateUpdateResult update(JsonObject jsonObject, JsonStateUpdater<T> stateUpdater, const String & originId) {
|
||||
beginTransaction();
|
||||
StateUpdateResult result = stateUpdater(jsonObject, _state);
|
||||
endTransaction();
|
||||
@@ -91,7 +91,7 @@ class StatefulService {
|
||||
return result;
|
||||
}
|
||||
|
||||
StateUpdateResult updateWithoutPropagation(JsonObject & jsonObject, JsonStateUpdater<T> stateUpdater) {
|
||||
StateUpdateResult updateWithoutPropagation(JsonObject jsonObject, JsonStateUpdater<T> stateUpdater) {
|
||||
beginTransaction();
|
||||
StateUpdateResult result = stateUpdater(jsonObject, _state);
|
||||
endTransaction();
|
||||
@@ -104,7 +104,7 @@ class StatefulService {
|
||||
endTransaction();
|
||||
}
|
||||
|
||||
void read(JsonObject & jsonObject, JsonStateReader<T> stateReader) {
|
||||
void read(JsonObject jsonObject, JsonStateReader<T> stateReader) {
|
||||
beginTransaction();
|
||||
stateReader(_state, jsonObject);
|
||||
endTransaction();
|
||||
|
||||
Reference in New Issue
Block a user