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: Remove value mangling and field misuse in SLE_WRITEBYTE. #7130

Merged
merged 1 commit into from Jan 30, 2019

Conversation

PeterN
Copy link
Member

@PeterN PeterN commented Jan 29, 2019

The original translation functionality hasn't been used since 2007. This removes a tiny bit of confusing cruft.

The original translation functionality hasn't been used since 2007.
@PeterN
Copy link
Member Author

PeterN commented Jan 29, 2019

For vehicles there is no difference, as the vehicle type value matches what was written before.

For stations/waypoints, technically there is a difference in that we will write out the actual value of facilities instead of just FACIL_NONE or FACIL_WAYPOINT. However, the code loading this already explicitly checks for the correct bit being set, rather than just comparing the value, so it works as expected as-is.

Copy link
Member

@LordAro LordAro left a comment

Choose a reason for hiding this comment

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

Looks fine, and I trust you to have tested sufficiently

Not merging though, I don't want that sort of blood on my hands

@PeterN PeterN merged commit 6763360 into OpenTTD:master Jan 30, 2019
@PeterN PeterN deleted the cleanup-writebyte-abuse branch January 30, 2019 18:21
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