added == operator
This commit is contained in:
parent
cc6e16e513
commit
519b26b5b4
9
size.h
9
size.h
|
@ -24,6 +24,7 @@ public:
|
|||
void setHeight(uint32 value);
|
||||
|
||||
bool constexpr isNull() const;
|
||||
bool constexpr operator==(const Size &other);
|
||||
std::string toString() const;
|
||||
|
||||
private:
|
||||
|
@ -87,6 +88,14 @@ inline constexpr bool Size::isNull() const
|
|||
return (m_width == 0) && (m_height == 0);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns whether this instance equals \a other.
|
||||
*/
|
||||
inline constexpr bool Size::operator==(const Size &other)
|
||||
{
|
||||
return (m_width == other.m_width) && (m_height == other.m_height);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the string representation of the current size.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue