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

Move config manager singleton to namespace #4653

Merged
merged 1 commit into from Apr 27, 2024

Conversation

ranisalt
Copy link
Member

Pull Request Prelude

Changes Proposed

Using a namespace rather than a singleton/global has two major advantages:

  • it avoids accidentally creating a new instance (which can be fixed with private constructor + getInstance static method, but this is verbose)
  • it does not generate RTTI for the class

It also reduces the size of the header by hiding what would be private in an anonymous namespace, and gives better opportunity to optimize it (no external interface to respect = compiler can go nuts)

Issues addressed:

@ranisalt ranisalt merged commit 73032fa into otland:master Apr 27, 2024
19 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants