Inject server configuration instead of using a singleton
This commit is contained in:
@@ -9,11 +9,6 @@ private:
|
||||
int port;
|
||||
bool isValid;
|
||||
|
||||
bool LoadFromFile(std::string const & filePath);
|
||||
|
||||
ServerConfiguration();
|
||||
~ServerConfiguration() = default;
|
||||
|
||||
public:
|
||||
int GetMajorVersion() const;
|
||||
int GetMinorVersion() const;
|
||||
@@ -22,7 +17,10 @@ public:
|
||||
int GetPort() const;
|
||||
bool IsValid() const;
|
||||
|
||||
static ServerConfiguration const & GetInstance();
|
||||
bool LoadFromFile(std::string const & filePath);
|
||||
|
||||
ServerConfiguration();
|
||||
~ServerConfiguration() = default;
|
||||
|
||||
ServerConfiguration(ServerConfiguration & other) = delete;
|
||||
ServerConfiguration(ServerConfiguration && other) = delete;
|
||||
|
||||
Reference in New Issue
Block a user