Fix warnings and a few other little things#18
Open
douglashill wants to merge 10 commits intorsattar:masterfrom
Open
Fix warnings and a few other little things#18douglashill wants to merge 10 commits intorsattar:masterfrom
douglashill wants to merge 10 commits intorsattar:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.