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

Resolve #3011 -- Fixing the suggested save names #3398

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

danil179
Copy link
Contributor

@danil179 danil179 commented Oct 5, 2023

This PR fixes #3011.

The saving mechanism works as follows:

  1. If the normal saved name doesn't exist it uses it.
  2. If it exist, it searches all the integer suffixes and chooses the least integer that is greater than 1 that is not already used.

This fixes the problem where the suggested names have already existed sometimes.

I added a commit at the start that resolves many compilation errors of std::min/max not found and a linking issue with to_json function when trying to compile on Windows using CMake on VS2019. Please let me know if I should remove this commit.

@KJeff01 KJeff01 changed the title Resolve #3193 -- Fixing the suggested save names Resolve #3011 -- Fixing the suggested save names Oct 5, 2023
@KJeff01
Copy link
Member

KJeff01 commented Oct 5, 2023

Looks and tests good. Only issue I see is some spelling mistakes in commit titles. compliation -> compilation, machenism -> mechanism.

@danil179
Copy link
Contributor Author

danil179 commented Oct 5, 2023

Thank you for the quick response! Should I rebase the commit and change the commits messages (this will probably rerun all the tests)? Or when merging you will rewrite the commit message?

@KJeff01
Copy link
Member

KJeff01 commented Oct 5, 2023

You can reword the commits.

@danil179
Copy link
Contributor Author

danil179 commented Oct 5, 2023

I reworded them.

@KJeff01 KJeff01 added this to the 4.4.0-beta1 milestone Oct 5, 2023
@KJeff01 KJeff01 merged commit 4cfce4d into Warzone2100:master Oct 6, 2023
@danil179 danil179 deleted the fix3193 branch November 3, 2023 01:19
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.

Trivial: Improve similar suggested save name
2 participants