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 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

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
1 check passed
1 check passed
OpenTTD CI Build #20190129.1 succeeded
Details
@PeterN PeterN deleted the PeterN:cleanup-writebyte-abuse branch Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.