Skip to content

Replace fabsf with ABS macro to avoid warnings #49

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

Closed
skela opened this issue Jan 12, 2016 · 2 comments
Closed

Replace fabsf with ABS macro to avoid warnings #49

skela opened this issue Jan 12, 2016 · 2 comments
Labels

Comments

@skela
Copy link
Contributor

skela commented Jan 12, 2016

There's currently 3 warnings in this library. 2 are because of the use of fabsf which is only correct when CGFloat is an alias for floats. Because this isn't always the case (64bit/32bit) it's giving 2 warnings.

If you replace the fabsf with the ABS macro, 2 warnings go away:

BOOL hasContentSize = fabsf(self.originalSize.width) > 0 && fabsf(self.originalSize.height) > 0;

BOOL hasContentSize = ABS(self.originalSize.width) > 0 && ABS(self.originalSize.height) > 0;
@dblock
Copy link
Collaborator

dblock commented Jan 12, 2016

Makes sense, please PR!

@skela
Copy link
Contributor Author

skela commented Jan 13, 2016

I've made a pull request here #50

@skela skela closed this as completed Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants