Skip to content

Conversation

@douglashill
Copy link

We have a lot of warnings turned on. In this branch, I’ve fixed those warnings, and a few other things. The commit messages explain each change.

Casting to CGFloat is ugly, but correct.
The weak variable was accessed more than once.
In this case it’s not a problem anyway. Restructuring the code like this happens to not result in the warning.
The instance variable and parameter are equal, so we can simply use the parameter instead.
Easiest way without casting is to use the parameter, since its nullability is unspecified, and the parameter is equal to the instance variable.
This will work better if something subclasses CLTokenInputView and also wants shared initialisation, and happens to use the same selector.
It would normally be expects for this parameter to follow the same ownership rules as the property is relates to.
This avoid laying out the view more than once per runloop cycle.
The comparison will take slightly longer, but this will avoid some cases of updating the view unnecessarily.
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.

1 participant