Skip to content

Simplify ProjectsList#183

Merged
DanielaOrtner merged 2 commits into
RebelToolbox:mainfrom
madmiraal:simplify-projectslist
Jul 18, 2025
Merged

Simplify ProjectsList#183
DanielaOrtner merged 2 commits into
RebelToolbox:mainfrom
madmiraal:simplify-projectslist

Conversation

@madmiraal
Copy link
Copy Markdown
Contributor

Currently, Project Manger's ProjectsList uses a Set to store the project keys of currently selected projects, and, when needed, converts this Set to a Vector of ProjectsListItem pointers. In addition, the first selected item is stored as index number to the list of projects, and, also when needed, converts this index to the ProjectsListItem.

To simplify things, this PR converts the Set of project keys to a Vector of ProjectListItem pointers and converts the reference to the first selected item to a pointer to the list item itself. This alleviates the need to make the conversion every time it is needed.

@madmiraal madmiraal added the PR Type: Enhancement Your current game will work better. label Jul 18, 2025
@DanielaOrtner DanielaOrtner self-requested a review July 18, 2025 09:01
Copy link
Copy Markdown
Contributor

@DanielaOrtner DanielaOrtner left a comment

Choose a reason for hiding this comment

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

Thanks for making our code base simpler to maintain and understand :)

@DanielaOrtner DanielaOrtner merged commit ee711a3 into RebelToolbox:main Jul 18, 2025
15 checks passed
@madmiraal madmiraal deleted the simplify-projectslist branch July 18, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR Type: Enhancement Your current game will work better.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants