Kaynağa Gözat

LibWeb+AudioServer: Remove unused spaceship operators

We aren't actually using these for anything, and the spaceship operator
requires ``<compare>`` from the STL, which we'd rather not include.
Andrew Kaster 3 yıl önce
ebeveyn
işleme
f1d47ea618

+ 0 - 5
Userland/Libraries/LibWeb/CSS/Number.h

@@ -68,11 +68,6 @@ public:
         return { Type::Number, m_value / other.m_value };
     }
 
-    auto operator<=>(Number const& other) const
-    {
-        return m_value - other.m_value;
-    }
-
 private:
     float m_value { 0 };
     Type m_type;

+ 0 - 5
Userland/Libraries/LibWeb/CSS/Ratio.cpp

@@ -27,9 +27,4 @@ String Ratio::to_string() const
     return String::formatted("{} / {}", m_first_value, m_second_value);
 }
 
-auto Ratio::operator<=>(Ratio const& other) const
-{
-    return value() - other.value();
-}
-
 }

+ 0 - 1
Userland/Libraries/LibWeb/CSS/Ratio.h

@@ -18,7 +18,6 @@ public:
     bool is_degenerate() const;
 
     String to_string() const;
-    auto operator<=>(Ratio const& other) const;
 
 private:
     float m_first_value { 0 };

+ 0 - 12
Userland/Services/AudioServer/FadingProperty.h

@@ -7,8 +7,6 @@
 #pragma once
 
 #include "Mixer.h"
-#include <compare>
-
 namespace AudioServer {
 
 // This is in buffer counts.
@@ -52,16 +50,6 @@ public:
         return m_old_value * (1 - m_current_fade) + m_new_value * (m_current_fade);
     }
 
-    auto operator<=>(FadingProperty<T> const& other) const
-    {
-        return static_cast<T>(this) <=> static_cast<T>(other);
-    }
-
-    auto operator<=>(T const& other) const
-    {
-        return static_cast<T>(*this) <=> other;
-    }
-
     void advance_time()
     {
         m_current_fade += 1.0 / static_cast<double>(m_fade_time);