Remove redundant operators !=
This commit is contained in:
@@ -51,11 +51,6 @@ struct spu_program
|
||||
|
||||
bool operator==(const spu_program& rhs) const noexcept;
|
||||
|
||||
bool operator!=(const spu_program& rhs) const noexcept
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
bool operator<(const spu_program& rhs) const noexcept;
|
||||
};
|
||||
|
||||
|
||||
@@ -354,75 +354,15 @@ namespace vm
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator ==(const null_t&, const _ptr_base<T, AT>& ptr)
|
||||
constexpr bool operator ==(const _ptr_base<T, AT>& ptr) const
|
||||
{
|
||||
return !ptr;
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator ==(const _ptr_base<T, AT>& ptr, const null_t&)
|
||||
constexpr bool operator <(const _ptr_base<T, AT>& ptr) const
|
||||
{
|
||||
return !ptr;
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator !=(const null_t&, const _ptr_base<T, AT>& ptr)
|
||||
{
|
||||
return ptr.operator bool();
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator !=(const _ptr_base<T, AT>& ptr, const null_t&)
|
||||
{
|
||||
return ptr.operator bool();
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator <(const null_t&, const _ptr_base<T, AT>& ptr)
|
||||
{
|
||||
return ptr.operator bool();
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator <(const _ptr_base<T, AT>&, const null_t&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator <=(const null_t&, const _ptr_base<T, AT>&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator <=(const _ptr_base<T, AT>& ptr, const null_t&)
|
||||
{
|
||||
return !ptr.operator bool();
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator >(const null_t&, const _ptr_base<T, AT>&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator >(const _ptr_base<T, AT>& ptr, const null_t&)
|
||||
{
|
||||
return ptr.operator bool();
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator >=(const null_t&, const _ptr_base<T, AT>& ptr)
|
||||
{
|
||||
return !ptr;
|
||||
}
|
||||
|
||||
template<typename T, typename AT>
|
||||
friend bool operator >=(const _ptr_base<T, AT>&, const null_t&)
|
||||
{
|
||||
return true;
|
||||
return 0 < ptr.addr();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -436,12 +376,6 @@ inline vm::if_comparable_t<T1, T2, bool> operator ==(const vm::_ptr_base<T1, AT1
|
||||
return left.addr() == right.addr();
|
||||
}
|
||||
|
||||
template<typename T1, typename AT1, typename T2, typename AT2>
|
||||
inline vm::if_comparable_t<T1, T2, bool> operator !=(const vm::_ptr_base<T1, AT1>& left, const vm::_ptr_base<T2, AT2>& right)
|
||||
{
|
||||
return left.addr() != right.addr();
|
||||
}
|
||||
|
||||
template<typename T1, typename AT1, typename T2, typename AT2>
|
||||
inline vm::if_comparable_t<T1, T2, bool> operator <(const vm::_ptr_base<T1, AT1>& left, const vm::_ptr_base<T2, AT2>& right)
|
||||
{
|
||||
|
||||
@@ -101,11 +101,6 @@ namespace rsx
|
||||
{
|
||||
return cpu_range == other.cpu_range && format == other.format && context == other.context;
|
||||
}
|
||||
|
||||
bool operator!=(const texture_cache_predictor_key& other) const
|
||||
{
|
||||
return !operator==(other);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,7 +106,6 @@ namespace rsx
|
||||
inline reference operator++() { next(); return **this; }
|
||||
inline reference operator++(int) { auto &res = **this; next(); return res; }
|
||||
inline bool operator==(const iterator_tmpl &rhs) const { return idx == rhs.idx; }
|
||||
inline bool operator!=(const iterator_tmpl &rhs) const { return idx != rhs.idx; }
|
||||
};
|
||||
|
||||
using iterator = iterator_tmpl<value_type, ranged_storage_block_list, typename list_type::iterator>;
|
||||
@@ -819,7 +818,6 @@ namespace rsx
|
||||
inline reference operator++() { next(); return *obj; }
|
||||
inline reference operator++(int) { auto *ptr = obj; next(); return *ptr; }
|
||||
inline bool operator==(const range_iterator_tmpl &rhs) const { return obj == rhs.obj && unowned_remaining == rhs.unowned_remaining; }
|
||||
inline bool operator!=(const range_iterator_tmpl &rhs) const { return !operator==(rhs); }
|
||||
|
||||
inline void set_end(u32 new_end)
|
||||
{
|
||||
|
||||
@@ -68,8 +68,7 @@ namespace rsx
|
||||
|
||||
surface_depth_format to_surface_depth_format(u8 in);
|
||||
|
||||
constexpr
|
||||
bool operator == (surface_depth_format2 rhs, surface_depth_format lhs)
|
||||
constexpr bool operator ==(surface_depth_format2 rhs, surface_depth_format lhs)
|
||||
{
|
||||
switch (lhs)
|
||||
{
|
||||
@@ -82,25 +81,6 @@ namespace rsx
|
||||
}
|
||||
}
|
||||
|
||||
// GCC requires every operator declared explicitly
|
||||
constexpr
|
||||
bool operator == (surface_depth_format rhs, surface_depth_format2 lhs)
|
||||
{
|
||||
return lhs == rhs;
|
||||
}
|
||||
|
||||
constexpr
|
||||
bool operator != (surface_depth_format2 rhs, surface_depth_format lhs)
|
||||
{
|
||||
return !(rhs == lhs);
|
||||
}
|
||||
|
||||
constexpr
|
||||
bool operator != (surface_depth_format rhs, surface_depth_format2 lhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
enum class surface_raster_type : u8
|
||||
{
|
||||
undefined = 0,
|
||||
|
||||
@@ -285,15 +285,6 @@ public:
|
||||
return value() == rhs;
|
||||
}
|
||||
|
||||
#if __cpp_impl_three_way_comparison >= 201711
|
||||
#else
|
||||
template <typename T2, typename = decltype(+std::declval<const T2&>())>
|
||||
constexpr bool operator!=(const T2& rhs) const noexcept
|
||||
{
|
||||
return !operator==<T2>(rhs);
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
template <typename T2>
|
||||
static constexpr bool check_args_for_bitwise_op()
|
||||
|
||||
@@ -140,11 +140,6 @@ namespace stx
|
||||
{
|
||||
return ptr == r.ptr;
|
||||
}
|
||||
|
||||
bool operator!=(const const_iterator& r) const
|
||||
{
|
||||
return ptr != r.ptr;
|
||||
}
|
||||
};
|
||||
|
||||
const_iterator begin() const
|
||||
|
||||
@@ -207,8 +207,6 @@ union alignas(16) v128
|
||||
|
||||
bool operator==(const v128& right) const;
|
||||
|
||||
bool operator!=(const v128& right) const;
|
||||
|
||||
// result = (~left) & (right)
|
||||
static inline v128 andnot(const v128& left, const v128& right);
|
||||
|
||||
|
||||
@@ -151,11 +151,6 @@ inline bool v128::operator==(const v128& right) const
|
||||
return _mm_movemask_epi8(v128::eq32(*this, right).vi) == 0xffff;
|
||||
}
|
||||
|
||||
inline bool v128::operator!=(const v128& right) const
|
||||
{
|
||||
return !operator==(right);
|
||||
}
|
||||
|
||||
// result = (~left) & (right)
|
||||
inline v128 v128::andnot(const v128& left, const v128& right)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user