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

Fix conversion warnings #989

Merged
merged 6 commits into from
Dec 20, 2018
Merged

Conversation

0x8000-0000
Copy link
Contributor

Supersedes #983. Rebased onto current master and resolved all review comments.

@0x8000-0000 0x8000-0000 force-pushed the fix-more-warnings-4 branch 2 times, most recently from 6d904c4 to b1c727e Compare December 20, 2018 02:33
@@ -1460,7 +1460,7 @@ FMT_CONSTEXPR unsigned parse_nonnegative_int(
}
unsigned value = 0;
// Convert to unsigned to prevent a warning.
unsigned max_int = (std::numeric_limits<int>::max)();
unsigned max_int = internal::to_unsigned(std::numeric_limits<int>::max());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fails to build on Windows. Somehow I get a feeling we're bitten by some max() macro coming from system headers or from the infamous <windows.h>

Ugh... so that's why it looked like that...

https://stackoverflow.com/questions/11544073/how-do-i-deal-with-the-max-macro-in-windows-h-colliding-with-max-in-std

@vitaut vitaut merged commit 0bbdca5 into fmtlib:master Dec 20, 2018
@vitaut
Copy link
Contributor

vitaut commented Dec 20, 2018

Merged, thanks!

@vitaut
Copy link
Contributor

vitaut commented Apr 19, 2019

@0x8000-0000, could you please review the updated CONTIBUTING document, particularly the part about licensing, and let me know if you agree with it being applied both to your contributions to {fmt}? The library is likely to be relicensed (#1073) so I'm collecting approval from all earlier contributors. Thanks!

@0x8000-0000
Copy link
Contributor Author

0x8000-0000 commented Apr 20, 2019 via email

@0x8000-0000 0x8000-0000 deleted the fix-more-warnings-4 branch November 25, 2021 15:42
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.

2 participants