-
Notifications
You must be signed in to change notification settings - Fork 810
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
Option change handlers should be registered outside of options.cpp
#7638
Labels
Comments
glebm
added a commit
to glebm/devilutionX
that referenced
this issue
Jan 10, 2025
In C++, globals initialization order accross translation units is not defined. Accessing a global via a function ensures that it is initialized. This will be needed for diasurgical#7638, which will statically initialize change handlers after the Options object has been initialized.
glebm
added a commit
to glebm/devilutionX
that referenced
this issue
Jan 10, 2025
In C++, globals initialization order accross translation units is not defined. Accessing a global via a function ensures that it is initialized. This will be needed for diasurgical#7638, which will statically initialize change handlers after the Options object has been initialized.
glebm
added a commit
to glebm/devilutionX
that referenced
this issue
Jan 10, 2025
In C++, globals initialization order accross translation units is not defined. Accessing a global via a function ensures that it is initialized. This will be needed for diasurgical#7638, which will statically initialize change handlers after the Options object has been initialized.
glebm
added a commit
to glebm/devilutionX
that referenced
this issue
Jan 11, 2025
In C++, globals initialization order accross translation units is not defined. Accessing a global via a function ensures that it is initialized. This will be needed for diasurgical#7638, which will statically initialize change handlers after the Options object has been initialized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Almost everything depends on
options.cpp
andoptions.cpp
depends on almost everything because the change handlers are registered withingoptions.cpp
.It'd be great to untangle this by moving the change handlers outside of
options.cpp
.E.g. currently in
options.cpp
we have:This code should be moved to
xpbar.cpp
to avoid this circular dependency.This will let us do things like building
data_file_test
without depending on all of DevilutionX.The text was updated successfully, but these errors were encountered: