diff options
author | Owen Williams <owilliams@mixxx.org> | 2015-05-07 11:47:11 -0400 |
---|---|---|
committer | Owen Williams <owilliams@mixxx.org> | 2015-05-07 11:47:11 -0400 |
commit | 116d7326a1a35f21643fff77acebd1dfaf0b6a53 (patch) | |
tree | 30ec8f4a6538e4ccb6cf7ca49a4c4a9796f82e6e /src/control | |
parent | 3089975ca0cab80a2d5c34361cb2f9b0a24c35c3 (diff) |
Revert "Use &ok, to check if we have a config value."
This reverts commit dc86fecb2ca07133e7d5faf8f1c031eddc2fcd8b.
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/control.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/control/control.cpp b/src/control/control.cpp index f70d0be885..17d30fa91b 100644 --- a/src/control/control.cpp +++ b/src/control/control.cpp @@ -47,11 +47,8 @@ void ControlDoublePrivate::initialize(double defaultValue) { if (m_bPersistInConfiguration) { ConfigObject<ConfigValue>* pConfig = ControlDoublePrivate::s_pUserConfig; if (pConfig != NULL) { - bool ok; - double configValue = pConfig->getValueString(m_key).toDouble(&ok); - if (ok) { - initialValue = configValue; - } + // Assume toDouble() returns 0 if conversion fails. + initialValue = pConfig->getValueString(m_key).toDouble(); } } m_value.setValue(initialValue); |