BooleanSetting: Initialize m_value to default_value in the constructor

Ensures all class state is initialized to valid values on construction.
This commit is contained in:
Lioncash 2017-03-03 14:08:33 -05:00
parent 25e70570b5
commit b592e4887e
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ namespace ControllerEmu
{
BooleanSetting::BooleanSetting(const std::string& setting_name, const std::string& ui_name,
const bool default_value, const SettingType setting_type)
: m_type(setting_type), m_name(setting_name), m_ui_name(ui_name), m_default_value(default_value)
: m_type(setting_type), m_name(setting_name), m_ui_name(ui_name),
m_default_value(default_value), m_value(default_value)
{
}