Config: Move default values to header file

Just to make the code style align with other places
This commit is contained in:
tt2468 2023-05-27 22:00:51 -07:00
parent 53d7596160
commit 1fc7900b1c
2 changed files with 10 additions and 20 deletions

View File

@ -38,16 +38,6 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#define CMDLINE_WEBSOCKET_DEBUG "websocket_debug"
Config::Config()
: PortOverridden(false),
PasswordOverridden(false),
FirstLoad(true),
ServerEnabled(false),
ServerPort(4455),
Ipv4Only(false),
DebugEnabled(false),
AlertsEnabled(false),
AuthRequired(true),
ServerPassword("")
{
SetDefaultsToGlobalStore();
}

View File

@ -30,17 +30,17 @@ struct Config {
void Load();
void Save();
void SetDefaultsToGlobalStore();
config_t *GetConfigStore();
static config_t *GetConfigStore();
std::atomic<bool> PortOverridden;
std::atomic<bool> PasswordOverridden;
std::atomic<bool> PortOverridden = false;
std::atomic<bool> PasswordOverridden = false;
std::atomic<bool> FirstLoad;
std::atomic<bool> ServerEnabled;
std::atomic<uint16_t> ServerPort;
std::atomic<bool> Ipv4Only;
std::atomic<bool> DebugEnabled;
std::atomic<bool> AlertsEnabled;
std::atomic<bool> AuthRequired;
std::atomic<bool> FirstLoad = true;
std::atomic<bool> ServerEnabled = false;
std::atomic<uint16_t> ServerPort = 4455;
std::atomic<bool> Ipv4Only = false;
std::atomic<bool> DebugEnabled = false;
std::atomic<bool> AlertsEnabled = false;
std::atomic<bool> AuthRequired = true;
QString ServerPassword;
};