Skip to content

Commit 0f092f3

Browse files
committed
[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.
1 parent be0b74b commit 0f092f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/Layout/ASLayoutElementPrivate.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ NS_ASSUME_NONNULL_END
6262
// Provides extension points for elments that comply to ASLayoutElement like ASLayoutSpec to add additional
6363
// properties besides the default one provided in ASLayoutElementStyle
6464

65-
static const int kMaxLayoutElementBoolExtensions = 1;
66-
static const int kMaxLayoutElementStateIntegerExtensions = 4;
67-
static const int kMaxLayoutElementStateEdgeInsetExtensions = 1;
65+
enum { kMaxLayoutElementBoolExtensions = 1 };
66+
enum { kMaxLayoutElementStateIntegerExtensions = 4 };
67+
enum { kMaxLayoutElementStateEdgeInsetExtensions = 1 };
6868

6969
typedef struct ASLayoutElementStyleExtensions {
7070
// Values to store extensions

0 commit comments

Comments
 (0)