refactor: remove redundant != operators c++20 std will generate the !=operator as long as the class has an ==operator

This commit is contained in:
sithlord48
2025-07-31 22:46:01 -04:00
committed by Chris Rizzitello
parent c2db28a624
commit e69be64773
8 changed files with 0 additions and 46 deletions

View File

@ -108,11 +108,6 @@ bool Thread::operator==(const Thread &thread) const
return ARCH->isSameThread(m_thread, thread.m_thread);
}
bool Thread::operator!=(const Thread &thread) const
{
return !ARCH->isSameThread(m_thread, thread.m_thread);
}
void *Thread::threadFunc(void *vjob)
{
// get this thread's id for logging

View File

@ -180,13 +180,6 @@ public:
Returns true if two Thread objects refer to the same thread.
*/
bool operator==(const Thread &) const;
//! Compare thread handles
/*!
Returns true if two Thread objects do not refer to the same thread.
*/
bool operator!=(const Thread &) const;
//@}
private:

View File

@ -176,11 +176,6 @@ bool NetworkAddress::operator==(const NetworkAddress &addr) const
return m_address == addr.m_address || ARCH->isEqualAddr(m_address, addr.m_address);
}
bool NetworkAddress::operator!=(const NetworkAddress &addr) const
{
return !operator==(addr);
}
bool NetworkAddress::isValid() const
{
return (m_address != nullptr);

View File

@ -70,12 +70,6 @@ public:
*/
bool operator==(const NetworkAddress &address) const;
//! Check address inequality
/*!
Returns true if this address is not equal to \p address.
*/
bool operator!=(const NetworkAddress &address) const;
//! Check address validity
/*!
Returns true if this is not the invalid address.

View File

@ -1438,11 +1438,6 @@ bool Config::CellEdge::operator==(const CellEdge &x) const
return (m_side == x.m_side && m_interval == x.m_interval);
}
bool Config::CellEdge::operator!=(const CellEdge &x) const
{
return !operator==(x);
}
//
// Config::Cell
//
@ -1566,11 +1561,6 @@ bool Config::Cell::operator==(const Cell &x) const
return true;
}
bool Config::Cell::operator!=(const Cell &x) const
{
return !operator==(x);
}
Config::Cell::const_iterator Config::Cell::begin() const
{
return m_neighbors.begin();

View File

@ -81,7 +81,6 @@ public:
// compares side and interval
bool operator==(const CellEdge &) const;
bool operator!=(const CellEdge &) const;
private:
void init(const std::string_view &name, Direction side, const Interval &);
@ -125,7 +124,6 @@ private:
bool getLink(Direction side, float position, const CellEdge *&src, const CellEdge *&dst) const;
bool operator==(const Cell &) const;
bool operator!=(const Cell &) const;
const_iterator begin() const;
const_iterator end() const;
@ -189,10 +187,6 @@ public:
{
return (m_i == i.m_i);
}
bool operator!=(const const_iterator &i) const
{
return (m_i != i.m_i);
}
private:
internal_const_iterator m_i;

View File

@ -873,11 +873,6 @@ bool InputFilter::operator==(const InputFilter &x) const
return (aList == bList);
}
bool InputFilter::operator!=(const InputFilter &x) const
{
return !operator==(x);
}
void InputFilter::handleEvent(const Event &event)
{
// copy event and adjust target

View File

@ -383,8 +383,6 @@ public:
//! Compare filters
bool operator==(const InputFilter &) const;
//! Compare filters
bool operator!=(const InputFilter &) const;
private:
// event handling