-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
small changes to reduce clang-9 warnings #1808
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
include/fmt/format.h
Outdated
using iterator = remove_reference_t<decltype(reserve(out, 0))>; | ||
using out_iterator = remove_reference_t<decltype(reserve(out, 0))>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is addressed with 412a658.
include/fmt/format.h
Outdated
@@ -1593,7 +1593,7 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer { | |||
format_decimal(digits, abs_value, num_digits); | |||
basic_memory_buffer<Char> buffer; | |||
size += prefix_size; | |||
buffer.resize(size); | |||
buffer.resize(to_unsigned(size)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest storing to_unsigned(size)
in a variable (usize
?) to avoid copy-pasta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is adressed with e6159ed.
d44ba72
to
3b75c41
Compare
…e-declaration (prevents shadow-waringing in clang)
…signed to prevent 'implicit conversion changes signedness'-warnings in clang.
Summary: Add PRs [#1808](fmtlib/fmt#1808), [#1812](fmtlib/fmt#1812), [#1816](fmtlib/fmt#1816), [#1818](fmtlib/fmt#1818) to improve cross-platform compatibility. Reviewed By: stepancheg Differential Revision: D23154350 fbshipit-source-id: 42f3781f70d376e1da2bcf34cb89a56f431371e4
Summary: Add PRs [#1808](fmtlib/fmt#1808), [#1812](fmtlib/fmt#1812), [#1816](fmtlib/fmt#1816), [#1818](fmtlib/fmt#1818) to improve cross-platform compatibility. Reviewed By: stepancheg Differential Revision: D23154350 fbshipit-source-id: 42f3781f70d376e1da2bcf34cb89a56f431371e4
No description provided.