@@ -39,7 +39,7 @@ enum class QuieterReportingPolicyEnum
39
39
enum class AttributeDirtyState
40
40
{
41
41
kNoReportNeeded = 0 ,
42
- kMustReport = 1 ,
42
+ kMustReport = 1 ,
43
43
};
44
44
45
45
using QuieterReportingPolicyFlags = BitFlags<QuieterReportingPolicyEnum>;
@@ -169,9 +169,11 @@ class QuieterReportingAttribute
169
169
* @param newValue - new value to set for the attribute
170
170
* @param now - system monotonic timestamp at the time of the call
171
171
* @param changedPredicate - functor to possibly override dirty state
172
- * @return AttributeDirtyState::kMustReport if attribute must be marked dirty right away, or AttributeDirtyState::kNoReportNeeded otherwise.
172
+ * @return AttributeDirtyState::kMustReport if attribute must be marked dirty right away, or
173
+ * AttributeDirtyState::kNoReportNeeded otherwise.
173
174
*/
174
- AttributeDirtyState SetValue (const chip::app::DataModel::Nullable<T> & newValue, Timestamp now, SufficientChangePredicate changedPredicate)
175
+ AttributeDirtyState SetValue (const chip::app::DataModel::Nullable<T> & newValue, Timestamp now,
176
+ SufficientChangePredicate changedPredicate)
175
177
{
176
178
bool isChangeOfNull = newValue.IsNull () ^ mValue .IsNull ();
177
179
bool areBothValuesNonNull = !newValue.IsNull () && !mValue .IsNull ();
@@ -181,7 +183,8 @@ class QuieterReportingAttribute
181
183
bool isDecrement = areBothValuesNonNull && (*newValue < *mValue );
182
184
183
185
bool isNewlyDirty = isChangeOfNull;
184
- isNewlyDirty = isNewlyDirty || (mPolicyFlags .Has (QuieterReportingPolicyEnum::kMarkDirtyOnChangeToFromZero ) && changeToFromZero);
186
+ isNewlyDirty =
187
+ isNewlyDirty || (mPolicyFlags .Has (QuieterReportingPolicyEnum::kMarkDirtyOnChangeToFromZero ) && changeToFromZero);
185
188
isNewlyDirty = isNewlyDirty || (mPolicyFlags .Has (QuieterReportingPolicyEnum::kMarkDirtyOnDecrement ) && isDecrement);
186
189
isNewlyDirty = isNewlyDirty || (mPolicyFlags .Has (QuieterReportingPolicyEnum::kMarkDirtyOnIncrement ) && isIncrement);
187
190
@@ -211,7 +214,8 @@ class QuieterReportingAttribute
211
214
*
212
215
* @param newValue - new value to set for the attribute
213
216
* @param now - system monotonic timestamp at the time of the call
214
- * @return AttributeDirtyState::kMustReport if attribute must be marked dirty right away, or AttributeDirtyState::kNoReportNeeded otherwise.
217
+ * @return AttributeDirtyState::kMustReport if attribute must be marked dirty right away, or
218
+ * AttributeDirtyState::kNoReportNeeded otherwise.
215
219
*/
216
220
AttributeDirtyState SetValue (const chip::app::DataModel::Nullable<T> & newValue, Timestamp now)
217
221
{
0 commit comments