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

Convert more C-style lists to std::list #3588

Merged

Conversation

ManManson
Copy link
Member

This pull request replaces apsProxDisp (PROXIMITY_DISPLAY) and apsMessages (MESSAGE) global lists to use std::list container instead of intrusive C-style linked lists.

Also, removed redundant psNext pointer from FLAG_POSITION struct.

asFeatureStats global array was converted to use std::vector.

Tests: Campaign, Beta -> Gamma transition, load/save campaign games.

…ctor`, respectively

Signed-off-by: Pavel Solodovnikov <[email protected]>
Replace while-based loops introduced by
Warzone2100#3572
with `mutating_list_iterate`.

Signed-off-by: Pavel Solodovnikov <[email protected]>
src/hci.cpp Outdated Show resolved Hide resolved
Don't use `.at()` method, which performs additional
bounds checking in cases where we know upfront
that the element exists.

Signed-off-by: Pavel Solodovnikov <[email protected]>
@past-due past-due merged commit e40b8ee into Warzone2100:master Jan 8, 2024
35 checks passed
@past-due past-due added this to the 4.5.0-beta1 milestone Jan 28, 2024
@ManManson ManManson deleted the switch_message_lists_to_std_list branch March 16, 2024 14:08
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.

2 participants