-
Notifications
You must be signed in to change notification settings - Fork 165
Avoid warning about __TIME__ in non-test builds #4966
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
base: master
Are you sure you want to change the base?
Conversation
| #ifdef STATIC_RANDOM_TESTS | ||
| inline consteval uint32_t CxPRNG(int16_t n = counter_val, std::array<char, 9> seed = std::array<char, 9>{__TIME__}) { | ||
| #else | ||
| inline consteval uint32_t CxPRNG(int16_t n = counter_val, std::array<char, 9> seed = std::array<char, 9>{"12:34:56"}) { |
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.
__TIME__ also appears on line 70 / 74
|
Does the new #define default off / not defined? Would it make sense to set it in |
Yes, it looks reasonable. |
| } | ||
| inline consteval int32_t RandIntCx(const int32_t min, const int32_t max, const int16_t n, | ||
| const std::array<char, 9> seed = std::array<char, 9>{__TIME__}) noexcept | ||
| #ifdef STATIC_RANDOM_TESTS |
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.
why not using a #define TEST_TIME_SEED [...] to avoid putting ifdef multiple times in the source code ?
This could be a way to fix #4811