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

-Wconversion compliant floats #37

Open
Ashton-W opened this issue Aug 27, 2014 · 0 comments
Open

-Wconversion compliant floats #37

Ashton-W opened this issue Aug 27, 2014 · 0 comments

Comments

@Ashton-W
Copy link

When using this wonderful plugin, code is generated like so:

[UIColor colorWithRed:0.065 green:0.576 blue:0.865 alpha:1.000];

This will cause warnings if -Wconversion is on:

error: implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float') [-Werror,-Wconversion]

It can be fixed with a simple change:

[UIColor colorWithRed:0.065f green:0.576f blue:0.865f alpha:1.000f];

ColorSense should use the later format, with f type specifiers.

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

No branches or pull requests

1 participant