Skip to content

Replace std::random_shuffle with std::shuffle #5140

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

Closed
wants to merge 1 commit into from

Conversation

nyllet
Copy link
Contributor

@nyllet nyllet commented Aug 8, 2024

random_shuffle was removed in c++17

Agreement

By creating a pull request in stk-code, you hereby agree to dual-license your contribution as
GNU General Public License version 3 or any later version and
Mozilla Public License version 2 or any later version.

This includes your previous contribution(s) under the same name of contributor.

Keep the above statement in the pull request comment for agreement.

random_shuffle was removed in c++17
@Alayan-stk-2
Copy link
Collaborator

Thanks for the PR.

As-is, however, it fails to pass some our CI checks.

@nyllet
Copy link
Contributor Author

nyllet commented Aug 8, 2024

hi

As-is, however, it fails to pass some our CI checks.
yes, i think it's because i changed from gnu++0x to c++11. i'll revert that and hopefully it builds on mingw as well

@nyllet nyllet closed this Aug 8, 2024
@kimden
Copy link
Contributor

kimden commented Aug 8, 2024

If you continue working on that, please test afterwards whether the online gameplay is unaffected — there was a case before when something was accidentally changed in random generators, and 'updated' servers/clients had different items from the 'old' ones. (If I'm not mistaken, something was postponed to the next major release even because of that.)

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.

3 participants