Remove unused code

math: Already replaced with C++17 double std::hypot
This commit is contained in:
Lars Toenning
2021-09-10 20:18:03 +02:00
parent 25491c0478
commit 7a02f2c2a6
6 changed files with 0 additions and 30 deletions

View File

@@ -25,14 +25,6 @@ namespace BlackMisc
*/
struct BLACKMISC_EXPORT CNotificationSounds
{
//! How to play?
enum PlayMode
{
Single,
SingleWithAutomaticDeletion,
EndlessLoop
};
//! Play notification
enum NotificationFlag
{
@@ -84,7 +76,6 @@ namespace BlackMisc
} // ns
} // ns
Q_DECLARE_METATYPE(BlackMisc::Audio::CNotificationSounds::PlayMode)
Q_DECLARE_METATYPE(BlackMisc::Audio::CNotificationSounds::Notification)
Q_DECLARE_METATYPE(BlackMisc::Audio::CNotificationSounds::NotificationFlag)

View File

@@ -26,10 +26,8 @@ namespace BlackMisc
// ENUMs
qDBusRegisterMetaType<PTTCOM>();
qDBusRegisterMetaType<CNotificationSounds::PlayMode>();
qDBusRegisterMetaType<CNotificationSounds::NotificationFlag>();
qDBusRegisterMetaType<CAudioDeviceInfo::DeviceType>();
qRegisterMetaTypeStreamOperators<CNotificationSounds::PlayMode>();
qRegisterMetaTypeStreamOperators<CNotificationSounds::NotificationFlag>();
}
}

View File

@@ -20,16 +20,6 @@ namespace BlackMisc
{
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)
{
const double result = std::pow(qAbs(x), 1.0 / 3.0);

View File

@@ -30,9 +30,6 @@ namespace BlackMisc
//! No objects, just static
CMathUtils() = delete;
//! Calculates the hypotenuse of x and y without overflow
static double hypot(double x, double y);
//! Calculates the square of x
static inline double square(double x)
{