mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[PR #2498] [CLOSED] Refactor GameListFrame Sorting for Improved Modularity and Efficiency #2783
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#2783
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/2498
Author: @colinmendoza121
Created: 2/22/2025
Status: ❌ Closed
Base:
main← Head:feature📝 Commits (3)
7d8d6e7Refactor string comparison helper function for case-insensitive comparisoned09da4Added CompareStringsCaseInsesitive helper functionaab9e5fMoved helper compare strings function above📊 Changes
1 file changed (+8 additions, -8 deletions)
View changed files
📝
src/qt_gui/game_list_frame.h(+8 -8)📄 Description
This pull request improves the modularity of the sorting functions in GameListFrame by introducing a helper function to handle case-insensitive string comparisons. Additionally, it optimizes the sorting logic to eliminate unnecessary heap allocations.
Changes:
Implemented CompareStringsCaseInsensitive as a dedicated helper function to avoid redundant code in ascending and descending sorting functions.
Optimized string comparisons using std::views::transform(::tolower) to prevent unnecessary heap allocations.
Updated CompareStringsAscending and CompareStringsDescending to utilize the helper function for cleaner, more maintainable code.
These changes improve code readability, reduce redundancy, and enhance performance when sorting game titles in the emulator’s UI.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.