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

Gecko/ARCode: Add sort by enabled state #11796

Merged
merged 2 commits into from May 2, 2023

Conversation

sepalani
Copy link
Contributor

This PR adds the ability to sort codes by enabled state which can be useful when you want to disable some codes but the code list is huge.

Ready to be reviewed & merged.

@sepalani sepalani force-pushed the gecko-sort branch 2 times, most recently from e3c504e to 0a9b7cc Compare April 27, 2023 19:01
@leoetlino
Copy link
Member

Maybe "Show Enabled Codes First" or something like that? "Sort By Enabled Codes" sounds a bit awkward IMO and doesn't really clarify what the option does. (Also, if you remove the past participle adjective then it becomes "Sort By Codes", which doesn't make sense.)

std::sort(m_ar_codes.begin(), m_ar_codes.end(),
[](const auto& a, const auto& b) { return a.enabled && a.enabled != b.enabled; });
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe std::stable_sort so the order within the enabled/disabled set gets preserved?

@lioncash lioncash merged commit 0b9b09a into dolphin-emu:master May 2, 2023
14 checks passed
@sepalani sepalani deleted the gecko-sort branch May 2, 2023 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants