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

Remove reference to g->m from map functions #34197

Merged
merged 3 commits into from
Sep 23, 2019

Conversation

BevapDin
Copy link
Contributor

SUMMARY: None

Those functions will use the implicitly given this object now.

Always using the main game map is redundant at best (as the function will typically be called on the main game map anyway, so this == &g->m).
But it may in fact be wrong: e.g. when the functions are called on a temporary map (e.g. during mapgen).

Those functions will use the implicitly given `this` object now.

Always using the main game map is redundant at best (as the function will typically be called on the main game map anyway, so `this == &g->m`).
But it may in fact be wrong: e.g. when the functions are called on a temporary map (e.g. during mapgen).
@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Map / Mapgen Overmap, Mapgen, Map extras, Map display labels Sep 23, 2019
@ZhilkinSerg ZhilkinSerg merged commit 858ae21 into CleverRaven:master Sep 23, 2019
@BevapDin BevapDin deleted the nuz branch September 25, 2019 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants