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

Simplify code by removing 2 global variables. #8178

Merged
merged 3 commits into from Jun 1, 2020
Merged

Conversation

Yexo
Copy link
Contributor

@Yexo Yexo commented May 31, 2020

No description provided.

frosch123
frosch123 previously approved these changes May 31, 2020
Copy link
Member

@frosch123 frosch123 left a comment

Choose a reason for hiding this comment

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

The removal of the timer could be a third commit, if you want.

@Yexo
Copy link
Contributor Author

Yexo commented May 31, 2020

The removal of the timer could be a third commit, if you want.

Thanks. It's indeed cleaner this way.

@@ -447,10 +448,14 @@ class BuildIndustryWindow : public Window {
strdim.width = max_minwidth;
}
d = maxdim(d, strdim);

if (indsp->grf_prop.grffile != nullptr) {
extra_lines_newgrf = max(extra_lines_newgrf, 4);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this just be

Suggested change
extra_lines_newgrf = max(extra_lines_newgrf, 4);
extra_lines_newgrf = 4;

? It's not modified anywhere else (also preferrably with some comment/constant name ? )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, and added a comment.

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.

LGTM

@Yexo Yexo merged commit 1507902 into OpenTTD:master Jun 1, 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

3 participants