otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.57k stars 1.05k forks source link

Move config manager singleton to namespace #4653

Closed ranisalt closed 4 months ago

ranisalt commented 4 months ago

Pull Request Prelude

Changes Proposed

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

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: