Skip to content

[iOS26] Fix warning in iOS26 - #2126

Merged
rcancro merged 1 commit into
TextureGroup:masterfrom
rcancro:ios26
Sep 12, 2025
Merged

rcancro merged 1 commit into
TextureGroup:masterfrom
rcancro:ios26

Conversation

@rcancro

@rcancro rcancro commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

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.

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.
@rcancro
rcancro merged commit 5d75e12 into TextureGroup:master Sep 12, 2025
1 of 11 checks passed
OhKanghoon pushed a commit to OhKanghoon/Texture that referenced this pull request Apr 4, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants