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 2 commits into from Apr 13, 2019


Copy link

@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
Copy link

@nielsmh nielsmh commented Apr 4, 2019

Some of the Kdtree queries should probably use this too.

@PeterN PeterN force-pushed the tilearea-expand branch from 75066ba to 7158640 Apr 11, 2019
@PeterN PeterN merged commit abe8cf4 into OpenTTD:master Apr 13, 2019
8 checks passed
@PeterN PeterN deleted the tilearea-expand branch Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants