added == operator

This commit is contained in:
Martchus 2016-03-13 18:17:41 +01:00
parent cc6e16e513
commit 519b26b5b4
1 changed files with 9 additions and 0 deletions

9
size.h
View File

@ -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.
*/