diff --git a/size.h b/size.h index 27649c8..ef9b1a6 100644 --- a/size.h +++ b/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. */