mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 05:55:33 +08:00
Remove redundant default initialization
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user