Replace 'inline constexpr' with only 'constexpr'

This commit is contained in:
Martchus 2017-08-17 18:15:03 +02:00
parent e9c923471b
commit 78ceef49fb
4 changed files with 20 additions and 20 deletions

View File

@ -8,11 +8,11 @@
namespace Media { namespace Media {
struct TAG_PARSER_EXPORT AspectRatio { struct TAG_PARSER_EXPORT AspectRatio {
AspectRatio(); constexpr AspectRatio();
AspectRatio(byte aspectRatioType); AspectRatio(byte aspectRatioType);
AspectRatio(uint16 numerator, uint16 denominator); constexpr AspectRatio(uint16 numerator, uint16 denominator);
bool isValid() const; constexpr bool isValid() const;
bool isExtended() const; constexpr bool isExtended() const;
byte type; byte type;
uint16 numerator; uint16 numerator;
@ -22,7 +22,7 @@ struct TAG_PARSER_EXPORT AspectRatio {
/*! /*!
* \brief Constructs an invalid aspect ratio. * \brief Constructs an invalid aspect ratio.
*/ */
inline AspectRatio::AspectRatio() : constexpr AspectRatio::AspectRatio() :
type(0), type(0),
numerator(0), numerator(0),
denominator(0) denominator(0)
@ -31,7 +31,7 @@ inline AspectRatio::AspectRatio() :
/*! /*!
* \brief Constructs a aspect ratio with the specified \a numerator and \a denominator. * \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), type(0xFF),
numerator(numerator), numerator(numerator),
denominator(denominator) 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. * \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; 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. * \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; return type == 0xFF;
} }

View File

@ -911,7 +911,7 @@ typename GenericFileElement<ImplementationType>::implementationType *GenericFile
* \brief Returns the maximum id length supported by the class in byte. * \brief Returns the maximum id length supported by the class in byte.
*/ */
template <class ImplementationType> template <class ImplementationType>
inline constexpr uint32 GenericFileElement<ImplementationType>::maximumIdLengthSupported() constexpr uint32 GenericFileElement<ImplementationType>::maximumIdLengthSupported()
{ {
return sizeof(identifierType); return sizeof(identifierType);
} }
@ -920,7 +920,7 @@ inline constexpr uint32 GenericFileElement<ImplementationType>::maximumIdLengthS
* \brief Returns the maximum size length supported by the class in byte. * \brief Returns the maximum size length supported by the class in byte.
*/ */
template <class ImplementationType> template <class ImplementationType>
inline constexpr uint32 GenericFileElement<ImplementationType>::maximumSizeLengthSupported() constexpr uint32 GenericFileElement<ImplementationType>::maximumSizeLengthSupported()
{ {
return sizeof(dataSizeType); return sizeof(dataSizeType);
} }
@ -929,7 +929,7 @@ inline constexpr uint32 GenericFileElement<ImplementationType>::maximumSizeLengt
* \brief Returns the mimimum element size. * \brief Returns the mimimum element size.
*/ */
template <class ImplementationType> template <class ImplementationType>
inline constexpr byte GenericFileElement<ImplementationType>::minimumElementSize() constexpr byte GenericFileElement<ImplementationType>::minimumElementSize()
{ {
return FileElementTraits<ImplementationType>::minimumElementSize(); return FileElementTraits<ImplementationType>::minimumElementSize();
} }

View File

@ -48,7 +48,7 @@ constexpr Margin::Margin(uint32 top, uint32 left, uint32 bottom, uint32 right) :
/*! /*!
* \brief Returns the top margin. * \brief Returns the top margin.
*/ */
inline constexpr uint32 Margin::top() const constexpr uint32 Margin::top() const
{ {
return m_top; return m_top;
} }
@ -64,7 +64,7 @@ inline void Margin::setTop(uint32 top)
/*! /*!
* \brief Returns the left margin. * \brief Returns the left margin.
*/ */
inline constexpr uint32 Margin::left() const constexpr uint32 Margin::left() const
{ {
return m_left; return m_left;
} }
@ -80,7 +80,7 @@ inline void Margin::setLeft(uint32 left)
/*! /*!
* \brief Returns the bottom margin. * \brief Returns the bottom margin.
*/ */
inline constexpr uint32 Margin::bottom() const constexpr uint32 Margin::bottom() const
{ {
return m_bottom; return m_bottom;
} }
@ -96,7 +96,7 @@ inline void Margin::setBottom(uint32 bottom)
/*! /*!
* \brief Returns the right margin. * \brief Returns the right margin.
*/ */
inline constexpr uint32 Margin::right() const constexpr uint32 Margin::right() const
{ {
return m_right; 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; * \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; return m_top == 0 && m_left == 0 && m_bottom == 0 && m_right == 0;
} }

8
size.h
View File

@ -52,7 +52,7 @@ constexpr Size::Size(uint32 width, uint32 height) :
/*! /*!
* \brief Returns the width. * \brief Returns the width.
*/ */
inline constexpr uint32 Size::width() const constexpr uint32 Size::width() const
{ {
return m_width; return m_width;
} }
@ -60,7 +60,7 @@ inline constexpr uint32 Size::width() const
/*! /*!
* \brief Returns the height. * \brief Returns the height.
*/ */
inline constexpr uint32 Size::height() const constexpr uint32 Size::height() const
{ {
return m_height; 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. * \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); 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. * \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); return (m_width == other.m_width) && (m_height == other.m_height);
} }