mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Rename Rect comparison operands to avoid confusion
This commit is contained in:
parent
58e83056bb
commit
f96bf1f300
@ -125,14 +125,14 @@ public:
|
|||||||
///
|
///
|
||||||
/// This operator compares strict equality between two rectangles.
|
/// This operator compares strict equality between two rectangles.
|
||||||
///
|
///
|
||||||
/// \param left Left operand (a rectangle)
|
/// \param lhs Left operand (a rectangle)
|
||||||
/// \param right Right operand (a rectangle)
|
/// \param rhs Right operand (a rectangle)
|
||||||
///
|
///
|
||||||
/// \return True if \a left is equal to \a right
|
/// \return True if \a lhs is equal to \a rhs
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
template <typename T>
|
template <typename T>
|
||||||
[[nodiscard]] constexpr bool operator==(const Rect<T>& left, const Rect<T>& right);
|
[[nodiscard]] constexpr bool operator==(const Rect<T>& lhs, const Rect<T>& rhs);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \relates Rect
|
/// \relates Rect
|
||||||
@ -140,14 +140,14 @@ template <typename T>
|
|||||||
///
|
///
|
||||||
/// This operator compares strict difference between two rectangles.
|
/// This operator compares strict difference between two rectangles.
|
||||||
///
|
///
|
||||||
/// \param left Left operand (a rectangle)
|
/// \param lhs Left operand (a rectangle)
|
||||||
/// \param right Right operand (a rectangle)
|
/// \param rhs Right operand (a rectangle)
|
||||||
///
|
///
|
||||||
/// \return True if \a left is not equal to \a right
|
/// \return True if \a lhs is not equal to \a rhs
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
template <typename T>
|
template <typename T>
|
||||||
[[nodiscard]] constexpr bool operator!=(const Rect<T>& left, const Rect<T>& right);
|
[[nodiscard]] constexpr bool operator!=(const Rect<T>& lhs, const Rect<T>& rhs);
|
||||||
|
|
||||||
// Create type aliases for the most common types
|
// Create type aliases for the most common types
|
||||||
using IntRect = Rect<int>;
|
using IntRect = Rect<int>;
|
||||||
|
@ -120,17 +120,17 @@ constexpr Vector2<T> Rect<T>::getCenter() const
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr bool operator==(const Rect<T>& left, const Rect<T>& right)
|
constexpr bool operator==(const Rect<T>& lhs, const Rect<T>& rhs)
|
||||||
{
|
{
|
||||||
return (left.position == right.position) && (left.size == right.size);
|
return (lhs.position == rhs.position) && (lhs.size == rhs.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr bool operator!=(const Rect<T>& left, const Rect<T>& right)
|
constexpr bool operator!=(const Rect<T>& lhs, const Rect<T>& rhs)
|
||||||
{
|
{
|
||||||
return !(left == right);
|
return !(lhs == rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
Loading…
Reference in New Issue
Block a user