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

Refactor number emitting (match precision of ruby sass) #1166

Merged
merged 1 commit into from
May 8, 2015

Conversation

mgreter
Copy link
Contributor

@mgreter mgreter commented May 5, 2015

Fixes #1153

@mgreter mgreter self-assigned this May 5, 2015
@mgreter mgreter added this to the 3.2.3 milestone May 5, 2015
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.07%) to 80.26% when pulling cc26444 on mgreter:bugfix/issue_1153 into 66631c0 on sass:master.

while (*it && *it == '0') ++ it;
bool is_int = (*it == 0);
// take a shortcut for integers
if (is_int)
Copy link
Contributor

Choose a reason for hiding this comment

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

bool is_int = d.find('.') == string::npos

?

@mgreter mgreter force-pushed the bugfix/issue_1153 branch from cc26444 to 8bc46e4 Compare May 5, 2015 21:05
@mgreter
Copy link
Contributor Author

mgreter commented May 5, 2015

Refactored the code and incorporated the feedback from @xzyfer. Made the code much more explicit. I think I cannot really improve much on it anymore. Hope CI build passes this times. IMHO appveyor sometimes fails for one build (with random errors it seems) ...

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 80.25% when pulling 8bc46e4 on mgreter:bugfix/issue_1153 into 66631c0 on sass:master.

@xzyfer
Copy link
Contributor

xzyfer commented May 8, 2015

👍

mgreter added a commit to mgreter/libsass that referenced this pull request May 8, 2015
@mgreter mgreter merged commit 8bc46e4 into sass:master May 8, 2015
@mgreter mgreter deleted the bugfix/issue_1153 branch July 28, 2015 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrectly output integers as float is precision is 0
3 participants