-
Notifications
You must be signed in to change notification settings - Fork 1.7k
mitigate clang build warnings -Wconversion #1763
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
Conversation
|
Yup, implicit conversions is perhaps one of the worst C/C++ "features". |
it's in bazel for tests only (!!). i'll see about improving that. |
include/benchmark/benchmark.h
Outdated
| int ArgsCnt() const; | ||
| const char* GetArgName(int arg) const; | ||
| const char* GetArgName(size_t arg) const; |
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'm not sure about this one, we return signed and then take unsigned.
I think things should generally be signed, but even then, this seems unconsistent
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.
yeah i didn't feel great about that either. i'll tweak it.
LebedevRI
left a comment
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.
a comment
|
|
||
| static const T kmax = std::numeric_limits<T>::max(); | ||
|
|
||
| // Space out the values in multiples of "mult" |
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'm somewhat surprized that this is needed, but okay, i guess?
LebedevRI
left a comment
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.
Seems fine to me, thank you!
No description provided.