MCPcopy Create free account
hub / github.com/SmingHub/Sming / getValueChanged

Function getValueChanged

Sming/Libraries/ArduinoJson6/include/ArduinoJson.h:96–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 * @retval bool true if value exists and has changed, `value` updated
95 */
96template <typename TSource, typename TDest> bool getValueChanged(const TSource& source, TDest& dest)
97{
98 if(source.isNull()) {
99 return false;
100 }
101
102 TDest value = source.template as<TDest>();
103 if(value == dest) {
104 return false; // value unchanged
105 }
106
107 dest = value;
108 return true;
109}
110
111/**
112 * @brief Describes format of serialized Json object

Callers

nothing calls this directly

Calls 1

isNullMethod · 0.45

Tested by

no test coverage detected