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

using effect_set = std::vector<effect*> #722

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

salix5
Copy link
Collaborator

@salix5 salix5 commented Feb 7, 2025

Replace effect_set with std::vector.
C++11 introduces range-based for loop and many std container interfaces, so keeping a user-defined container (which is still a std container inside) is unnecessary.

改成直接使用 std::vector
C++11加入range-based for loop以及各種作用於標準庫容器的函式
現代已經沒有必要使用自定義容器增加維護難度

except b757aa3
all commits are string replacements.

add_item => push_back
eset.remove_item(i) => eset.erase(eset.begin() + i)
get_last => back
eset.sort() => std::sort(eset.begin(), eset.end(), effect_sort_id);

Reference
edo9300/ygopro-core@be30a51

@mercury233
@purerosefallen
@Wind2009-Louse
@fallenstardust

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.

1 participant