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: Replace duplicated code with TileArea::Expand() #7467

Merged
merged 2 commits into from Apr 13, 2019

Conversation

PeterN
Copy link
Member

@PeterN PeterN commented Apr 4, 2019

Code for expanding an OrthogonalTileArea is duplicated throughout the code, sometimes missing bounds checks. This PR adds a function to expand with bounds checking, and uses it where possible.

src/tilearea.cpp Outdated Show resolved Hide resolved
@nielsmh
Copy link
Contributor

nielsmh commented Apr 4, 2019

Some of the Kdtree queries should probably use this too.

@PeterN PeterN merged commit abe8cf4 into OpenTTD:master Apr 13, 2019
@PeterN PeterN deleted the tilearea-expand branch April 13, 2019 13:12
douiwby pushed a commit to douiwby/OpenTTD that referenced this pull request Apr 16, 2020
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

4 participants