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

Dev boost filesystem removal #789

Merged
merged 2 commits into from Jun 17, 2016
Merged

Dev boost filesystem removal #789

merged 2 commits into from Jun 17, 2016

Conversation

Erihel
Copy link
Contributor

@Erihel Erihel commented Jun 9, 2016

This pull request removes boost::filesystem from resource manager. Now boost::filesystem is only used before resource manager takes control. I did not touch CBot code and how files are handled there.

There's also small change to save naming.

In order to remove boost:filesystem from CResourceManager Move()
function has to be removed or rewrited. Since Move is only used in
autosave rotation it's simpler to change autosave rotation and remove
Move().

Now oldest autosaves (with lowest timestamp) will be removed in rotation.
@krzys-h
Copy link
Member

krzys-h commented Jun 9, 2016

👍, looks good, I'll test this when I have some time

@krzys-h krzys-h self-assigned this Jun 9, 2016
}

int CRobotMain::GetAutosaveSlots()
{
return m_autosaveSlots;
}

int CRobotMain::AutosaveRotate(bool freeOne)
// Remove oldest saves with autosave prefix
void CRobotMain::AutosaveRotate()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the freeOne parameter broke behaviour of autosave rotation when changing amount of autosave slots in settings. Now when you adjust the number of slots, the AutosaveRotate function will remove one save too much (it assumes that a new save is going to be always created immediately after, which is not the case)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess AutosaveRotate() call can be removed when setting slot number. This way it'll remain simple and it'll delete old saves on next autosave.

@krzys-h krzys-h merged commit 32629a2 into colobot:dev Jun 17, 2016
krzys-h added a commit that referenced this pull request Jun 17, 2016
krzys-h added a commit that referenced this pull request Jun 17, 2016
@Erihel Erihel deleted the dev-boost-filesystem-removal branch June 17, 2016 20:43
@Erihel Erihel restored the dev-boost-filesystem-removal branch June 17, 2016 20:43
@Erihel Erihel deleted the dev-boost-filesystem-removal branch June 17, 2016 20:43
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.

None yet

2 participants