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

SettingConfig scope issue #315

Closed
chavez-ju opened this issue Jun 25, 2020 · 2 comments
Closed

SettingConfig scope issue #315

chavez-ju opened this issue Jun 25, 2020 · 2 comments

Comments

@chavez-ju
Copy link

Within the SettingConfig class, adding a new setting to a config object requires an already initialized variable to be used in order for a pointer to be established to that variable within SettingInfo. This can pose issues in the case that a config is used out of scope from where settings were added. A possible solution is to create a deep copy of those variables inside the config rather than establishing a pointer to the initialized variables.

@emilydolson
Copy link
Collaborator

Upon further examination, this turns out to be a way simpler fix than I expected. The already initialized variable was already optional for both the SettingInfo constructor and ComboSettingInfo constructor. The AddComboSetting method already had a version that didn't require a pre-initialized variable, so I created a parallel version of the AddSetting method that also doesn't.

@emilydolson
Copy link
Collaborator

I'm going to go ahead and close this because this issue ended up being more elaborate than this and it is fixed in #414

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

No branches or pull requests

2 participants