diff --git a/aspectratio.h b/aspectratio.h index 937910f..42ff466 100644 --- a/aspectratio.h +++ b/aspectratio.h @@ -8,11 +8,11 @@ namespace Media { struct TAG_PARSER_EXPORT AspectRatio { - AspectRatio(); + constexpr AspectRatio(); AspectRatio(byte aspectRatioType); - AspectRatio(uint16 numerator, uint16 denominator); - bool isValid() const; - bool isExtended() const; + constexpr AspectRatio(uint16 numerator, uint16 denominator); + constexpr bool isValid() const; + constexpr bool isExtended() const; byte type; uint16 numerator; @@ -22,7 +22,7 @@ struct TAG_PARSER_EXPORT AspectRatio { /*! * \brief Constructs an invalid aspect ratio. */ -inline AspectRatio::AspectRatio() : +constexpr AspectRatio::AspectRatio() : type(0), numerator(0), denominator(0) @@ -31,7 +31,7 @@ inline AspectRatio::AspectRatio() : /*! * \brief Constructs a aspect ratio with the specified \a numerator and \a denominator. */ -inline AspectRatio::AspectRatio(uint16 numerator, uint16 denominator) : +constexpr AspectRatio::AspectRatio(uint16 numerator, uint16 denominator) : type(0xFF), numerator(numerator), denominator(denominator) @@ -40,7 +40,7 @@ inline AspectRatio::AspectRatio(uint16 numerator, uint16 denominator) : /*! * \brief Returns an indication whether the aspect ratio is present and valid. */ -inline bool AspectRatio::isValid() const +constexpr bool AspectRatio::isValid() const { return type && numerator && denominator; } @@ -48,7 +48,7 @@ inline bool AspectRatio::isValid() const /*! * \brief Returns whether numerator and denominator must be read from extended SAR header. */ -inline bool AspectRatio::isExtended() const +constexpr bool AspectRatio::isExtended() const { return type == 0xFF; } diff --git a/genericfileelement.h b/genericfileelement.h index 3cfac6c..aa827fa 100644 --- a/genericfileelement.h +++ b/genericfileelement.h @@ -911,7 +911,7 @@ typename GenericFileElement::implementationType *GenericFile * \brief Returns the maximum id length supported by the class in byte. */ template -inline constexpr uint32 GenericFileElement::maximumIdLengthSupported() +constexpr uint32 GenericFileElement::maximumIdLengthSupported() { return sizeof(identifierType); } @@ -920,7 +920,7 @@ inline constexpr uint32 GenericFileElement::maximumIdLengthS * \brief Returns the maximum size length supported by the class in byte. */ template -inline constexpr uint32 GenericFileElement::maximumSizeLengthSupported() +constexpr uint32 GenericFileElement::maximumSizeLengthSupported() { return sizeof(dataSizeType); } @@ -929,7 +929,7 @@ inline constexpr uint32 GenericFileElement::maximumSizeLengt * \brief Returns the mimimum element size. */ template -inline constexpr byte GenericFileElement::minimumElementSize() +constexpr byte GenericFileElement::minimumElementSize() { return FileElementTraits::minimumElementSize(); } diff --git a/margin.h b/margin.h index 43ce92b..68b4fd4 100644 --- a/margin.h +++ b/margin.h @@ -48,7 +48,7 @@ constexpr Margin::Margin(uint32 top, uint32 left, uint32 bottom, uint32 right) : /*! * \brief Returns the top margin. */ -inline constexpr uint32 Margin::top() const +constexpr uint32 Margin::top() const { return m_top; } @@ -64,7 +64,7 @@ inline void Margin::setTop(uint32 top) /*! * \brief Returns the left margin. */ -inline constexpr uint32 Margin::left() const +constexpr uint32 Margin::left() const { return m_left; } @@ -80,7 +80,7 @@ inline void Margin::setLeft(uint32 left) /*! * \brief Returns the bottom margin. */ -inline constexpr uint32 Margin::bottom() const +constexpr uint32 Margin::bottom() const { return m_bottom; } @@ -96,7 +96,7 @@ inline void Margin::setBottom(uint32 bottom) /*! * \brief Returns the right margin. */ -inline constexpr uint32 Margin::right() const +constexpr uint32 Margin::right() const { return m_right; } @@ -112,7 +112,7 @@ inline void Margin::setRight(uint32 right) /*! * \brief Returns true if all margins are is 0; otherwise returns false; */ -inline constexpr bool Margin::isNull() const +constexpr bool Margin::isNull() const { return m_top == 0 && m_left == 0 && m_bottom == 0 && m_right == 0; } diff --git a/size.h b/size.h index 7700967..4e24109 100644 --- a/size.h +++ b/size.h @@ -52,7 +52,7 @@ constexpr Size::Size(uint32 width, uint32 height) : /*! * \brief Returns the width. */ -inline constexpr uint32 Size::width() const +constexpr uint32 Size::width() const { return m_width; } @@ -60,7 +60,7 @@ inline constexpr uint32 Size::width() const /*! * \brief Returns the height. */ -inline constexpr uint32 Size::height() const +constexpr uint32 Size::height() const { return m_height; } @@ -84,7 +84,7 @@ inline void Size::setHeight(uint32 value) /*! * \brief Returns an indication whether both the width and height is 0. */ -inline constexpr bool Size::isNull() const +constexpr bool Size::isNull() const { return (m_width == 0) && (m_height == 0); } @@ -92,7 +92,7 @@ inline constexpr bool Size::isNull() const /*! * \brief Returns whether this instance equals \a other. */ -inline constexpr bool Size::operator==(const Size &other) const +constexpr bool Size::operator==(const Size &other) const { return (m_width == other.m_width) && (m_height == other.m_height); }