mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
Remove unused code
math: Already replaced with C++17 double std::hypot
This commit is contained in:
@@ -338,7 +338,6 @@ namespace BlackCore
|
|||||||
|
|
||||||
m_output->start(useOutputDevice, m_outputSampleProvider);
|
m_output->start(useOutputDevice, m_outputSampleProvider);
|
||||||
m_input->start(useInputDevice);
|
m_input->start(useInputDevice);
|
||||||
m_startDateTimeUtc = QDateTime::currentDateTimeUtc();
|
|
||||||
|
|
||||||
// runs in correct thread
|
// runs in correct thread
|
||||||
m_voiceServerTimer->start(PositionUpdatesMs); // start for preset values
|
m_voiceServerTimer->start(PositionUpdatesMs); // start for preset values
|
||||||
|
|||||||
@@ -113,9 +113,6 @@ namespace BlackCore
|
|||||||
//! Client started?
|
//! Client started?
|
||||||
bool isStarted() const { return m_isStarted; }
|
bool isStarted() const { return m_isStarted; }
|
||||||
|
|
||||||
//! When started
|
|
||||||
const QDateTime &getStartDateTimeUtc() const { return m_startDateTimeUtc; }
|
|
||||||
|
|
||||||
//! Muted
|
//! Muted
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
//! @{
|
//! @{
|
||||||
@@ -411,8 +408,6 @@ namespace BlackCore
|
|||||||
std::atomic_bool m_winCoInitialized { false }; //!< Windows only CoInitializeEx
|
std::atomic_bool m_winCoInitialized { false }; //!< Windows only CoInitializeEx
|
||||||
std::atomic_bool m_integratedComUnit { false }; //!< is COM unit sychronized, integrated?
|
std::atomic_bool m_integratedComUnit { false }; //!< is COM unit sychronized, integrated?
|
||||||
|
|
||||||
QDateTime m_startDateTimeUtc;
|
|
||||||
|
|
||||||
double m_inputVolumeDb = 0.0;
|
double m_inputVolumeDb = 0.0;
|
||||||
int m_outputMasterVolumeNormalized = 0;
|
int m_outputMasterVolumeNormalized = 0;
|
||||||
int m_outputVolumeCom1Normalized = 0;
|
int m_outputVolumeCom1Normalized = 0;
|
||||||
|
|||||||
@@ -25,14 +25,6 @@ namespace BlackMisc
|
|||||||
*/
|
*/
|
||||||
struct BLACKMISC_EXPORT CNotificationSounds
|
struct BLACKMISC_EXPORT CNotificationSounds
|
||||||
{
|
{
|
||||||
//! How to play?
|
|
||||||
enum PlayMode
|
|
||||||
{
|
|
||||||
Single,
|
|
||||||
SingleWithAutomaticDeletion,
|
|
||||||
EndlessLoop
|
|
||||||
};
|
|
||||||
|
|
||||||
//! Play notification
|
//! Play notification
|
||||||
enum NotificationFlag
|
enum NotificationFlag
|
||||||
{
|
{
|
||||||
@@ -84,7 +76,6 @@ namespace BlackMisc
|
|||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(BlackMisc::Audio::CNotificationSounds::PlayMode)
|
|
||||||
Q_DECLARE_METATYPE(BlackMisc::Audio::CNotificationSounds::Notification)
|
Q_DECLARE_METATYPE(BlackMisc::Audio::CNotificationSounds::Notification)
|
||||||
Q_DECLARE_METATYPE(BlackMisc::Audio::CNotificationSounds::NotificationFlag)
|
Q_DECLARE_METATYPE(BlackMisc::Audio::CNotificationSounds::NotificationFlag)
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,8 @@ namespace BlackMisc
|
|||||||
|
|
||||||
// ENUMs
|
// ENUMs
|
||||||
qDBusRegisterMetaType<PTTCOM>();
|
qDBusRegisterMetaType<PTTCOM>();
|
||||||
qDBusRegisterMetaType<CNotificationSounds::PlayMode>();
|
|
||||||
qDBusRegisterMetaType<CNotificationSounds::NotificationFlag>();
|
qDBusRegisterMetaType<CNotificationSounds::NotificationFlag>();
|
||||||
qDBusRegisterMetaType<CAudioDeviceInfo::DeviceType>();
|
qDBusRegisterMetaType<CAudioDeviceInfo::DeviceType>();
|
||||||
qRegisterMetaTypeStreamOperators<CNotificationSounds::PlayMode>();
|
|
||||||
qRegisterMetaTypeStreamOperators<CNotificationSounds::NotificationFlag>();
|
qRegisterMetaTypeStreamOperators<CNotificationSounds::NotificationFlag>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,16 +20,6 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
namespace Math
|
namespace Math
|
||||||
{
|
{
|
||||||
double CMathUtils::hypot(double x, double y)
|
|
||||||
{
|
|
||||||
x = qAbs(x);
|
|
||||||
y = qAbs(y);
|
|
||||||
const double max = std::max(x, y);
|
|
||||||
const double min = std::min(x, y);
|
|
||||||
double r = min / max;
|
|
||||||
return max * sqrt(1 + r * r);
|
|
||||||
}
|
|
||||||
|
|
||||||
double CMathUtils::cubicRootReal(double x)
|
double CMathUtils::cubicRootReal(double x)
|
||||||
{
|
{
|
||||||
const double result = std::pow(qAbs(x), 1.0 / 3.0);
|
const double result = std::pow(qAbs(x), 1.0 / 3.0);
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ namespace BlackMisc
|
|||||||
//! No objects, just static
|
//! No objects, just static
|
||||||
CMathUtils() = delete;
|
CMathUtils() = delete;
|
||||||
|
|
||||||
//! Calculates the hypotenuse of x and y without overflow
|
|
||||||
static double hypot(double x, double y);
|
|
||||||
|
|
||||||
//! Calculates the square of x
|
//! Calculates the square of x
|
||||||
static inline double square(double x)
|
static inline double square(double x)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user