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

refactor: Mod information extraction #830

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

Conversation

Alystrasz
Copy link
Contributor

In the same fashion than #829, extracts some ModManager code into a dedicated method (and adds some documentation as a bonus).

@github-actions github-actions bot added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Nov 29, 2024
@Alystrasz Alystrasz mentioned this pull request Nov 29, 2024
19 tasks
Copy link
Member

@GeckoEidechse GeckoEidechse left a comment

Choose a reason for hiding this comment

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

Is there a reason we don't return anything from the helper function and instead directly store it in the method field?

As opposed to calling the helper function, returning the collected information and then storing it in the field?

(Not saying it needs to be changed, just curious ^^)

primedev/mods/modmanager.cpp Show resolved Hide resolved
primedev/mods/modmanager.cpp Show resolved Hide resolved
@Alystrasz
Copy link
Contributor Author

Is there a reason we don't return anything from the helper function and instead directly store it in the method field?
As opposed to calling the helper function, returning the collected information and then storing it in the field?
(Not saying it needs to be changed, just curious ^^)

I simply exported some code into this new function, that initializes the m_LoadedMods variable state of the ModManager instance; I thought of it as a kind of __init__ function, that does not necessarily need to return something :)

Copy link
Member

@GeckoEidechse GeckoEidechse left a comment

Choose a reason for hiding this comment

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

Open questions have been addressed. Just moves code around as verified when checking locally.

Apart from the return value aspect which I'd be happy for someone else to also comment on this should be good from the code review side of things ^^

@GeckoEidechse GeckoEidechse removed the needs code review Changes from PR still need to be reviewed in code label Nov 29, 2024
@GeckoEidechse
Copy link
Member

GeckoEidechse commented Nov 29, 2024

Tbh, not even sure if this needs testing or not. Could just test in prod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs testing Changes from the PR still need to be tested
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants