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

Cleanup for cgFloatForYogaFloat #1571

Merged
merged 1 commit into from
Aug 12, 2019
Merged

Conversation

maicki
Copy link
Contributor

@maicki maicki commented Jul 5, 2019

  • Return CGFloat
  • Proper check for YGUndefined
  • Add YGUndefined default return value

- Return CGFloat
- Proper check for YGUndefined
- Add YGUndefined default return value
@maicki maicki requested review from Adlai-Holler and appleguy July 17, 2019 17:13
width = cgFloatForYogaFloat(width);
height = cgFloatForYogaFloat(height);
width = cgFloatForYogaFloat(width, CGFLOAT_MAX);
height = cgFloatForYogaFloat(height, CGFLOAT_MAX);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a case where the undefined default is something besides CGFLOAT_MAX?

Copy link
Member

Choose a reason for hiding this comment

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

good point. I think it's cleaner to stick to CGFLOAT_MAX as the default value (and thus no need for the extra undefinedDefault param) until we have cases in which CGFLOAT_MAX is not desired.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There will be a case where CGFLOAT_MAX is not desired ...

nguyenhuy
nguyenhuy previously approved these changes Jul 28, 2019
@nguyenhuy nguyenhuy dismissed their stale review August 12, 2019 19:51

second thought

@nguyenhuy nguyenhuy merged commit 0c78681 into master Aug 12, 2019
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.

3 participants