diff --git a/src/app/util/attribute-storage-helpers.h b/src/app/util/attribute-storage-null-handling.h similarity index 92% rename from src/app/util/attribute-storage-helpers.h rename to src/app/util/attribute-storage-null-handling.h index f748d364ed1a09..b7a6d908fac6b3 100644 --- a/src/app/util/attribute-storage-helpers.h +++ b/src/app/util/attribute-storage-null-handling.h @@ -15,11 +15,6 @@ * limitations under the License. */ -/** - * Helpers for manipulating values that are going into and out of the attribute - * store. - */ - #pragma once #include @@ -37,7 +32,9 @@ struct NumericAttributeTraits using StorageType = T; // The value reserved in the value space of StorageType to represent null, - // for cases when we have a nullable value. + // for cases when we have a nullable value. This value must match the value + // excluded from the valid value range in the spec, so that we don't confuse + // valid values with null. static constexpr StorageType kNullValue = std::is_signed::value ? std::numeric_limits::min() : std::numeric_limits::max(); diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 5c66d8c5043835..949dd6703c6745 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt index 4fd02afbd0e31b..b51829b143f0dc 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace chip { namespace app { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index a2b6752f74cd16..84a84720f3d9d7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include namespace chip { namespace app {