Skip to content

Commit

Permalink
LibWeb+AudioServer: Remove unused spaceship operators
Browse files Browse the repository at this point in the history
We aren't actually using these for anything, and the spaceship operator
requires ``<compare>`` from the STL, which we'd rather not include.
  • Loading branch information
ADKaster authored and bgianfo committed Apr 23, 2022
1 parent 83603d6 commit f1d47ea
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
5 changes: 0 additions & 5 deletions Userland/Libraries/LibWeb/CSS/Number.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions Userland/Libraries/LibWeb/CSS/Ratio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}
1 change: 0 additions & 1 deletion Userland/Libraries/LibWeb/CSS/Ratio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
12 changes: 0 additions & 12 deletions Userland/Services/AudioServer/FadingProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#pragma once

#include "Mixer.h"
#include <compare>

namespace AudioServer {

// This is in buffer counts.
Expand Down Expand Up @@ -52,16 +50,6 @@ class FadingProperty {
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);
Expand Down

0 comments on commit f1d47ea

Please sign in to comment.