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

Codechange: Rewrite grfid to use modernish C++. #26

Merged
merged 1 commit into from
Nov 26, 2023

Conversation

PeterN
Copy link
Member

@PeterN PeterN commented Nov 25, 2023

grfid is based on ancient C code, with non-cross-platform file-handling and Windows support shoe-horned in.

Rewrite to use C++ primitives instead, using standard filestream to read files into a vector and read with an iterator.

mmap/munmap is no longer used but that was entirely frivolous.

glx22
glx22 previously approved these changes Nov 25, 2023
Copy link
Contributor

@glx22 glx22 left a comment

Choose a reason for hiding this comment

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

We add 2 more warnings, but I'm fine with that.

Use standard filestream to read files into a vector and read with an iterator.

mmap/munmap is no longer used but that was entirely frivolous.
@glx22 glx22 merged commit ab143e2 into OpenTTD:master Nov 26, 2023
8 checks passed
@PeterN PeterN deleted the grfid-rewrite branch November 26, 2023 00:15
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.

2 participants