remove obsolete reference to JsonObject

This commit is contained in:
Proddy
2024-01-06 17:42:42 +01:00
parent 778cdaabb6
commit 10d6728c82
41 changed files with 170 additions and 170 deletions

View File

@@ -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();