You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: