Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASPrimitiveTraitCollection] Fix ASPrimitiveTraitCollectionMakeDefault and implement containerSize #1256

Merged
merged 1 commit into from
Nov 28, 2018

Conversation

rcancro
Copy link
Contributor

@rcancro rcancro commented Nov 28, 2018

With the changes to ASPrimitiveTraitCollection in e392f83 a new ASPrimitiveTraitCollectionMakeDefault was created. The new method didn’t give all values in an ASPrimitiveTraitCollection a default value (or initialize the struct with {}). This was causing fields like userInterfaceIdiom, forceTouchCapability, and displayScale to be filled with garbage, leading to ASPrimitiveTraitCollectionIsEqualToASPrimitiveTraitCollection to return YES when the trait collection hadn’t really changed.

It also looks like the getter containerSize was not implemented.

…t and implement containerSize

With the changes to `ASPrimitiveTraitCollection` in TextureGroup@e392f83 a new `ASPrimitiveTraitCollectionMakeDefault` was created. The new method didn’t give all values in an `ASPrimitiveTraitCollection` a default value (or initialize the struct with `{}`). This was causing fields like `userInterfaceIdiom`, `forceTouchCapability`, and `displayScale` to be filled with garbage, leading to `ASPrimitiveTraitCollectionIsEqualToASPrimitiveTraitCollection` to return `YES` when the trait collection hadn’t really changed.

It also looks like the getter `containerSize` was not implemented.
@rcancro rcancro changed the title [ASPrimitiveTraitCollection] Fix ASPrimitiveTraitCollectionMakeDefaul… [ASPrimitiveTraitCollection] Fix ASPrimitiveTraitCollectionMakeDefault and implement containerSize Nov 28, 2018
Copy link
Member

@nguyenhuy nguyenhuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing this!

Copy link
Contributor

@maicki maicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ricky <3! @rcancro

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's run away together Ricky 💕

@nguyenhuy nguyenhuy merged commit 3daa5ac into TextureGroup:master Nov 28, 2018
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.

None yet

4 participants