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

View File

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