Remove redundant default initialization

This commit is contained in:
Lars Toenning
2023-11-07 21:11:55 +01:00
parent a140795995
commit e2b5cfb4d6
2 changed files with 1 additions and 15 deletions

View File

@@ -28,11 +28,6 @@ namespace BlackMisc::Audio
return v; return v;
} }
CSettings::CSettings()
{
this->initDefaultValues();
}
bool CSettings::isNotificationFlagSet(CNotificationSounds::NotificationFlag notification) const bool CSettings::isNotificationFlagSet(CNotificationSounds::NotificationFlag notification) const
{ {
return this->getNotification().testFlag(notification); return this->getNotification().testFlag(notification);
@@ -112,10 +107,4 @@ namespace BlackMisc::Audio
return u"Notification flags: " % CNotificationSounds::toString(this->getNotification()) % return u"Notification flags: " % CNotificationSounds::toString(this->getNotification()) %
u" volume: " % QString::number(m_notificationVolume); u" volume: " % QString::number(m_notificationVolume);
} }
void CSettings::initDefaultValues()
{
this->setNotification(CNotificationSounds::AllNotifications);
m_notificationVolume = 90;
}
} // namespace } // namespace

View File

@@ -39,7 +39,7 @@ namespace BlackMisc::Audio
//! @} //! @}
//! Default constructor. //! Default constructor.
CSettings(); CSettings() = default;
//! Notification flag (play notification?) //! Notification flag (play notification?)
bool isNotificationFlagSet(CNotificationSounds::NotificationFlag notification) const; bool isNotificationFlagSet(CNotificationSounds::NotificationFlag notification) const;
@@ -119,9 +119,6 @@ namespace BlackMisc::Audio
//! Audio effects //! Audio effects
void setAudioEffectsEnabled(bool enabled) { m_audioEffects = enabled; } void setAudioEffectsEnabled(bool enabled) { m_audioEffects = enabled; }
//! Init with meaningful default values
void initDefaultValues();
//! \copydoc BlackMisc::Mixin::String::toQString //! \copydoc BlackMisc::Mixin::String::toQString
QString convertToQString(bool i18n = false) const; QString convertToQString(bool i18n = false) const;