From 0f092f34ae83027e50b0080edb6955fdc7a8e54f Mon Sep 17 00:00:00 2001 From: rcancro Date: Fri, 12 Sep 2025 10:54:21 -0700 Subject: [PATCH] [iOS26] Fix warning in iOS26 When compiling in Xcode 26 we get the warning `variable length array folded to constant array as an extension` for the arrays in this struct: ``` typedef struct ASLayoutElementStyleExtensions { // Values to store extensions BOOL boolExtensions[kMaxLayoutElementBoolExtensions]; NSInteger integerExtensions[kMaxLayoutElementStateIntegerExtensions]; UIEdgeInsets edgeInsetsExtensions[kMaxLayoutElementStateEdgeInsetExtensions]; } ASLayoutElementStyleExtensions; ``` To make it happy we could make these constants `#define` or stick them in an `enum`. I chose the latter. --- Source/Layout/ASLayoutElementPrivate.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Layout/ASLayoutElementPrivate.h b/Source/Layout/ASLayoutElementPrivate.h index bf8c05bfa..7282fa6e7 100644 --- a/Source/Layout/ASLayoutElementPrivate.h +++ b/Source/Layout/ASLayoutElementPrivate.h @@ -62,9 +62,9 @@ NS_ASSUME_NONNULL_END // Provides extension points for elments that comply to ASLayoutElement like ASLayoutSpec to add additional // properties besides the default one provided in ASLayoutElementStyle -static const int kMaxLayoutElementBoolExtensions = 1; -static const int kMaxLayoutElementStateIntegerExtensions = 4; -static const int kMaxLayoutElementStateEdgeInsetExtensions = 1; +enum { kMaxLayoutElementBoolExtensions = 1 }; +enum { kMaxLayoutElementStateIntegerExtensions = 4 }; +enum { kMaxLayoutElementStateEdgeInsetExtensions = 1 }; typedef struct ASLayoutElementStyleExtensions { // Values to store extensions