diff --git a/aac/aacframe.h b/aac/aacframe.h index 4f66069..bd4b88e 100644 --- a/aac/aacframe.h +++ b/aac/aacframe.h @@ -27,7 +27,7 @@ constexpr auto aacSbrM = 49; constexpr auto aacSbrMaxLe = 5; constexpr auto aacSbrMaxNtsrhfg = 40; -typedef const sbyte (*SbrHuffTab)[2]; +using SbrHuffTab = const sbyte (*)[2]; namespace AacSyntaxElementTypes { enum KnownTypes : byte { diff --git a/avc/avcinfo.h b/avc/avcinfo.h index f8543d6..acf92ce 100644 --- a/avc/avcinfo.h +++ b/avc/avcinfo.h @@ -15,12 +15,12 @@ namespace TagParser { /*! * \brief Type used to store unsigned integer values using golomb coding. */ -typedef uint32 ugolomb; +using ugolomb = uint32; /*! * \brief Type used to store signed integer values using golomb coding. */ -typedef int32 sgolomb; +using sgolomb = int32; struct TAG_PARSER_EXPORT TimingInfo { constexpr TimingInfo(); diff --git a/fieldbasedtag.h b/fieldbasedtag.h index 26a73c8..9bc8b75 100644 --- a/fieldbasedtag.h +++ b/fieldbasedtag.h @@ -32,9 +32,10 @@ template class FieldMapBasedTag : public Tag { friend class FieldMapBasedTagTraits; public: - typedef typename FieldMapBasedTagTraits::FieldType FieldType; - typedef typename FieldMapBasedTagTraits::FieldType::IdentifierType IdentifierType; - typedef typename FieldMapBasedTagTraits::Compare Compare; + using FieldType = typename FieldMapBasedTagTraits::FieldType; + using IdentifierType = typename FieldMapBasedTagTraits::FieldType::IdentifierType; + using Compare = typename FieldMapBasedTagTraits::Compare; + using FieldMapBasedTagBase = FieldMapBasedTag; FieldMapBasedTag(); diff --git a/genericcontainer.h b/genericcontainer.h index 9dca4c7..44a9096 100644 --- a/genericcontainer.h +++ b/genericcontainer.h @@ -49,10 +49,10 @@ public: void removeAllTracks() override; void reset() override; - typedef FileInfoType ContainerFileInfoType; - typedef TagType ContainerTagType; - typedef TrackType ContainerTrackType; - typedef ElementType ContainerElementType; + using ContainerFileInfoType = FileInfoType; + using ContainerTagType = TagType; + using ContainerTrackType = TrackType; + using ContainerElementType = ElementType; protected: std::unique_ptr m_firstElement; diff --git a/genericfileelement.h b/genericfileelement.h index b71215f..cb9c6b7 100644 --- a/genericfileelement.h +++ b/genericfileelement.h @@ -51,17 +51,17 @@ public: /*! * \brief Specifies the type of the corresponding container. */ - typedef typename FileElementTraits::ContainerType ContainerType; + using ContainerType = typename FileElementTraits::ContainerType; /*! * \brief Specifies the type used to store identifiers. */ - typedef typename FileElementTraits::IdentifierType IdentifierType; + using IdentifierType = typename FileElementTraits::IdentifierType; /*! * \brief Specifies the type used to store data sizes. */ - typedef typename FileElementTraits::DataSizeType DataSizeType; + using DataSizeType = typename FileElementTraits::DataSizeType; GenericFileElement(ContainerType &container, uint64 startOffset); GenericFileElement(ImplementationType &parent, uint64 startOffset); diff --git a/generictagfield.h b/generictagfield.h index 254c0cf..f31bf02 100644 --- a/generictagfield.h +++ b/generictagfield.h @@ -31,8 +31,8 @@ template class TAG_PARSER_EXPORT TagField { friend class TagFieldTraits; public: - typedef typename TagFieldTraits::IdentifierType IdentifierType; - typedef typename TagFieldTraits::TypeInfoType TypeInfoType; + using IdentifierType = typename TagFieldTraits::IdentifierType; + using TypeInfoType = typename TagFieldTraits::TypeInfoType; TagField(); TagField(const IdentifierType &id, const TagValue &value); diff --git a/id3/id3v2frame.h b/id3/id3v2frame.h index e9f718e..7ec4294 100644 --- a/id3/id3v2frame.h +++ b/id3/id3v2frame.h @@ -79,8 +79,8 @@ inline uint32 Id3v2FrameMaker::requiredSize() const */ template <> class TAG_PARSER_EXPORT TagFieldTraits { public: - typedef uint32 IdentifierType; - typedef byte TypeInfoType; + using IdentifierType = uint32; + using TypeInfoType = byte; }; class TAG_PARSER_EXPORT Id3v2Frame : public TagField { diff --git a/id3/id3v2tag.h b/id3/id3v2tag.h index da88e34..5ae4b21 100644 --- a/id3/id3v2tag.h +++ b/id3/id3v2tag.h @@ -54,8 +54,8 @@ inline uint64 Id3v2TagMaker::requiredSize() const */ template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits { public: - typedef Id3v2Frame FieldType; - typedef FrameComparer Compare; + using FieldType = Id3v2Frame; + using Compare = FrameComparer; }; class TAG_PARSER_EXPORT Id3v2Tag : public FieldMapBasedTag { diff --git a/matroska/ebmlelement.h b/matroska/ebmlelement.h index 45711a2..010474f 100644 --- a/matroska/ebmlelement.h +++ b/matroska/ebmlelement.h @@ -23,9 +23,9 @@ class MatroskaContainer; */ template <> class TAG_PARSER_EXPORT FileElementTraits { public: - typedef MatroskaContainer ContainerType; - typedef uint32 IdentifierType; - typedef uint64 DataSizeType; + using ContainerType = MatroskaContainer; + using IdentifierType = uint32; + using DataSizeType = uint64; }; class TAG_PARSER_EXPORT EbmlElement : public GenericFileElement { diff --git a/matroska/matroskatag.cpp b/matroska/matroskatag.cpp index 27d419b..22bce22 100644 --- a/matroska/matroskatag.cpp +++ b/matroska/matroskatag.cpp @@ -280,7 +280,7 @@ void MatroskaTagMaker::make(ostream &stream) const stream.write(t.levelName().c_str(), t.levelName().size()); } // write UIDs - typedef pair> p; + using p = pair>; for (const auto &pair : initializer_list

{ p(MatroskaIds::TagTrackUID, t.tracks()), p(MatroskaIds::TagEditionUID, t.editions()), p(MatroskaIds::TagChapterUID, t.chapters()), p(MatroskaIds::TagAttachmentUID, t.attachments()) }) { if (!pair.second.empty()) { diff --git a/matroska/matroskatag.h b/matroska/matroskatag.h index edd2589..b492f59 100644 --- a/matroska/matroskatag.h +++ b/matroska/matroskatag.h @@ -51,8 +51,8 @@ inline uint64 MatroskaTagMaker::requiredSize() const */ template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits { public: - typedef MatroskaTagField FieldType; - typedef std::less Compare; + using FieldType = MatroskaTagField; + using Compare = std::less; }; class TAG_PARSER_EXPORT MatroskaTag : public FieldMapBasedTag { diff --git a/matroska/matroskatagfield.h b/matroska/matroskatagfield.h index dd8017a..a69e41e 100644 --- a/matroska/matroskatagfield.h +++ b/matroska/matroskatagfield.h @@ -14,8 +14,8 @@ class Diagnostics; */ template <> class TAG_PARSER_EXPORT TagFieldTraits { public: - typedef std::string IdentifierType; - typedef std::string TypeInfoType; + using IdentifierType = std::string; + using TypeInfoType = std::string; static bool supportsNestedFields(); }; diff --git a/mp4/mp4atom.h b/mp4/mp4atom.h index dfa7c8d..271efa9 100644 --- a/mp4/mp4atom.h +++ b/mp4/mp4atom.h @@ -22,9 +22,9 @@ class Mp4Container; */ template <> class TAG_PARSER_EXPORT FileElementTraits { public: - typedef Mp4Container ContainerType; - typedef uint32 IdentifierType; - typedef uint64 DataSizeType; + using ContainerType = Mp4Container; + using IdentifierType = uint32; + using DataSizeType = uint64; /*! * \brief Returns the minimal atom size which is 8 byte. diff --git a/mp4/mp4tag.h b/mp4/mp4tag.h index bf4e395..8b75633 100644 --- a/mp4/mp4tag.h +++ b/mp4/mp4tag.h @@ -90,8 +90,8 @@ inline uint64 Mp4TagMaker::requiredSize() const */ template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits { public: - typedef Mp4TagField FieldType; - typedef std::less Compare; + using FieldType = Mp4TagField; + using Compare = std::less; }; class TAG_PARSER_EXPORT Mp4Tag : public FieldMapBasedTag { diff --git a/mp4/mp4tagfield.h b/mp4/mp4tagfield.h index 7858232..fa7257a 100644 --- a/mp4/mp4tagfield.h +++ b/mp4/mp4tagfield.h @@ -53,8 +53,8 @@ class Diagnostics; */ template <> class TAG_PARSER_EXPORT TagFieldTraits { public: - typedef uint32 IdentifierType; - typedef uint32 TypeInfoType; + using IdentifierType = uint32; + using TypeInfoType = uint32; }; class Mp4Atom; diff --git a/mp4/mpeg4descriptor.h b/mp4/mpeg4descriptor.h index d02f896..d33e345 100644 --- a/mp4/mpeg4descriptor.h +++ b/mp4/mpeg4descriptor.h @@ -15,9 +15,9 @@ class Mpeg4Descriptor; */ template <> class TAG_PARSER_EXPORT FileElementTraits { public: - typedef Mp4Container ContainerType; - typedef byte IdentifierType; - typedef uint32 DataSizeType; + using ContainerType = Mp4Container; + using IdentifierType = byte; + using DataSizeType = uint32; /*! * \brief Returns the minimal descriptor size which is 2 byte. diff --git a/tagtarget.h b/tagtarget.h index 505804e..a8fe22a 100644 --- a/tagtarget.h +++ b/tagtarget.h @@ -20,8 +20,8 @@ TAG_PARSER_EXPORT const char *tagTargetLevelName(TagTargetLevel tagTargetLevel); class TAG_PARSER_EXPORT TagTarget { public: - typedef uint64 IdType; - typedef std::vector IdContainerType; + using IdType = uint64; + using IdContainerType = std::vector; TagTarget(uint64 level = 0, IdContainerType tracks = IdContainerType(), IdContainerType chapters = IdContainerType(), IdContainerType editions = IdContainerType(), IdContainerType attachments = IdContainerType()); diff --git a/vorbis/vorbiscomment.h b/vorbis/vorbiscomment.h index ebec118..fdac148 100644 --- a/vorbis/vorbiscomment.h +++ b/vorbis/vorbiscomment.h @@ -18,8 +18,8 @@ class Diagnostics; */ template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits { public: - typedef VorbisCommentField FieldType; - typedef CaseInsensitiveStringComparer Compare; + using FieldType = VorbisCommentField; + using Compare = CaseInsensitiveStringComparer; }; class TAG_PARSER_EXPORT VorbisComment : public FieldMapBasedTag { diff --git a/vorbis/vorbiscommentfield.h b/vorbis/vorbiscommentfield.h index 7229f71..c72e729 100644 --- a/vorbis/vorbiscommentfield.h +++ b/vorbis/vorbiscommentfield.h @@ -38,8 +38,8 @@ class Diagnostics; */ template <> class TAG_PARSER_EXPORT TagFieldTraits { public: - typedef std::string IdentifierType; - typedef uint32 TypeInfoType; + using IdentifierType = std::string; + using TypeInfoType = uint32; }; class OggIterator;