From f1d47ea618b9c8be9a448ec1130099b0985d3630 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 9 Apr 2022 16:02:13 -0600 Subject: [PATCH] LibWeb+AudioServer: Remove unused spaceship operators We aren't actually using these for anything, and the spaceship operator requires ```` from the STL, which we'd rather not include. --- Userland/Libraries/LibWeb/CSS/Number.h | 5 ----- Userland/Libraries/LibWeb/CSS/Ratio.cpp | 5 ----- Userland/Libraries/LibWeb/CSS/Ratio.h | 1 - Userland/Services/AudioServer/FadingProperty.h | 12 ------------ 4 files changed, 23 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/Number.h b/Userland/Libraries/LibWeb/CSS/Number.h index e24f9e584bdfa5..3d78e28e78a656 100644 --- a/Userland/Libraries/LibWeb/CSS/Number.h +++ b/Userland/Libraries/LibWeb/CSS/Number.h @@ -68,11 +68,6 @@ class Number { 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; diff --git a/Userland/Libraries/LibWeb/CSS/Ratio.cpp b/Userland/Libraries/LibWeb/CSS/Ratio.cpp index b2a46b766a502d..1271f60d829bcc 100644 --- a/Userland/Libraries/LibWeb/CSS/Ratio.cpp +++ b/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(); -} - } diff --git a/Userland/Libraries/LibWeb/CSS/Ratio.h b/Userland/Libraries/LibWeb/CSS/Ratio.h index 724530ba50f5ae..ea63a2291999e5 100644 --- a/Userland/Libraries/LibWeb/CSS/Ratio.h +++ b/Userland/Libraries/LibWeb/CSS/Ratio.h @@ -18,7 +18,6 @@ class Ratio { bool is_degenerate() const; String to_string() const; - auto operator<=>(Ratio const& other) const; private: float m_first_value { 0 }; diff --git a/Userland/Services/AudioServer/FadingProperty.h b/Userland/Services/AudioServer/FadingProperty.h index 7f20942713e620..fb37dffd3dbea1 100644 --- a/Userland/Services/AudioServer/FadingProperty.h +++ b/Userland/Services/AudioServer/FadingProperty.h @@ -7,8 +7,6 @@ #pragma once #include "Mixer.h" -#include - namespace AudioServer { // This is in buffer counts. @@ -52,16 +50,6 @@ class FadingProperty { return m_old_value * (1 - m_current_fade) + m_new_value * (m_current_fade); } - auto operator<=>(FadingProperty const& other) const - { - return static_cast(this) <=> static_cast(other); - } - - auto operator<=>(T const& other) const - { - return static_cast(*this) <=> other; - } - void advance_time() { m_current_fade += 1.0 / static_cast(m_fade_time);