MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / sameRegisterValue

Function sameRegisterValue

app/src/DataModel/DataTable.cpp:56–63  ·  view source on GitHub ↗

* @brief Returns true when two register values are identical (same type and payload); identical * rewrites must not bump slot versions or change-driven transforms would re-run on every * parser write instead of on value changes. */

Source from the content-addressed store, hash-verified

54 * parser write instead of on value changes.
55 */
56[[nodiscard]] static bool sameRegisterValue(const DataModel::RegisterValue& a,
57 const DataModel::RegisterValue& b)
58{
59 if (a.isNumeric != b.isNumeric)
60 return false;
61
62 return a.isNumeric ? (a.numericValue == b.numericValue) : (a.stringValue == b.stringValue);
63}
64
65//--------------------------------------------------------------------------------------------------
66// Initialization

Callers 3

setByInternedKeyMethod · 0.85
setMethod · 0.85
setByHandleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected