Replace typedef with using
This commit is contained in:
parent
d434c4e299
commit
af4b43ff79
|
@ -27,7 +27,7 @@ constexpr auto aacSbrM = 49;
|
||||||
constexpr auto aacSbrMaxLe = 5;
|
constexpr auto aacSbrMaxLe = 5;
|
||||||
constexpr auto aacSbrMaxNtsrhfg = 40;
|
constexpr auto aacSbrMaxNtsrhfg = 40;
|
||||||
|
|
||||||
typedef const sbyte (*SbrHuffTab)[2];
|
using SbrHuffTab = const sbyte (*)[2];
|
||||||
|
|
||||||
namespace AacSyntaxElementTypes {
|
namespace AacSyntaxElementTypes {
|
||||||
enum KnownTypes : byte {
|
enum KnownTypes : byte {
|
||||||
|
|
|
@ -15,12 +15,12 @@ namespace TagParser {
|
||||||
/*!
|
/*!
|
||||||
* \brief Type used to store unsigned integer values using golomb coding.
|
* \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.
|
* \brief Type used to store signed integer values using golomb coding.
|
||||||
*/
|
*/
|
||||||
typedef int32 sgolomb;
|
using sgolomb = int32;
|
||||||
|
|
||||||
struct TAG_PARSER_EXPORT TimingInfo {
|
struct TAG_PARSER_EXPORT TimingInfo {
|
||||||
constexpr TimingInfo();
|
constexpr TimingInfo();
|
||||||
|
|
|
@ -32,9 +32,10 @@ template <class ImplementationType> class FieldMapBasedTag : public Tag {
|
||||||
friend class FieldMapBasedTagTraits<ImplementationType>;
|
friend class FieldMapBasedTagTraits<ImplementationType>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename FieldMapBasedTagTraits<ImplementationType>::FieldType FieldType;
|
using FieldType = typename FieldMapBasedTagTraits<ImplementationType>::FieldType;
|
||||||
typedef typename FieldMapBasedTagTraits<ImplementationType>::FieldType::IdentifierType IdentifierType;
|
using IdentifierType = typename FieldMapBasedTagTraits<ImplementationType>::FieldType::IdentifierType;
|
||||||
typedef typename FieldMapBasedTagTraits<ImplementationType>::Compare Compare;
|
using Compare = typename FieldMapBasedTagTraits<ImplementationType>::Compare;
|
||||||
|
using FieldMapBasedTagBase = FieldMapBasedTag<ImplementationType>;
|
||||||
|
|
||||||
FieldMapBasedTag();
|
FieldMapBasedTag();
|
||||||
|
|
||||||
|
|
|
@ -49,10 +49,10 @@ public:
|
||||||
void removeAllTracks() override;
|
void removeAllTracks() override;
|
||||||
void reset() override;
|
void reset() override;
|
||||||
|
|
||||||
typedef FileInfoType ContainerFileInfoType;
|
using ContainerFileInfoType = FileInfoType;
|
||||||
typedef TagType ContainerTagType;
|
using ContainerTagType = TagType;
|
||||||
typedef TrackType ContainerTrackType;
|
using ContainerTrackType = TrackType;
|
||||||
typedef ElementType ContainerElementType;
|
using ContainerElementType = ElementType;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::unique_ptr<ElementType> m_firstElement;
|
std::unique_ptr<ElementType> m_firstElement;
|
||||||
|
|
|
@ -51,17 +51,17 @@ public:
|
||||||
/*!
|
/*!
|
||||||
* \brief Specifies the type of the corresponding container.
|
* \brief Specifies the type of the corresponding container.
|
||||||
*/
|
*/
|
||||||
typedef typename FileElementTraits<ImplementationType>::ContainerType ContainerType;
|
using ContainerType = typename FileElementTraits<ImplementationType>::ContainerType;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Specifies the type used to store identifiers.
|
* \brief Specifies the type used to store identifiers.
|
||||||
*/
|
*/
|
||||||
typedef typename FileElementTraits<ImplementationType>::IdentifierType IdentifierType;
|
using IdentifierType = typename FileElementTraits<ImplementationType>::IdentifierType;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Specifies the type used to store data sizes.
|
* \brief Specifies the type used to store data sizes.
|
||||||
*/
|
*/
|
||||||
typedef typename FileElementTraits<ImplementationType>::DataSizeType DataSizeType;
|
using DataSizeType = typename FileElementTraits<ImplementationType>::DataSizeType;
|
||||||
|
|
||||||
GenericFileElement(ContainerType &container, uint64 startOffset);
|
GenericFileElement(ContainerType &container, uint64 startOffset);
|
||||||
GenericFileElement(ImplementationType &parent, uint64 startOffset);
|
GenericFileElement(ImplementationType &parent, uint64 startOffset);
|
||||||
|
|
|
@ -31,8 +31,8 @@ template <class ImplementationType> class TAG_PARSER_EXPORT TagField {
|
||||||
friend class TagFieldTraits<ImplementationType>;
|
friend class TagFieldTraits<ImplementationType>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename TagFieldTraits<ImplementationType>::IdentifierType IdentifierType;
|
using IdentifierType = typename TagFieldTraits<ImplementationType>::IdentifierType;
|
||||||
typedef typename TagFieldTraits<ImplementationType>::TypeInfoType TypeInfoType;
|
using TypeInfoType = typename TagFieldTraits<ImplementationType>::TypeInfoType;
|
||||||
|
|
||||||
TagField();
|
TagField();
|
||||||
TagField(const IdentifierType &id, const TagValue &value);
|
TagField(const IdentifierType &id, const TagValue &value);
|
||||||
|
|
|
@ -79,8 +79,8 @@ inline uint32 Id3v2FrameMaker::requiredSize() const
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT TagFieldTraits<Id3v2Frame> {
|
template <> class TAG_PARSER_EXPORT TagFieldTraits<Id3v2Frame> {
|
||||||
public:
|
public:
|
||||||
typedef uint32 IdentifierType;
|
using IdentifierType = uint32;
|
||||||
typedef byte TypeInfoType;
|
using TypeInfoType = byte;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TAG_PARSER_EXPORT Id3v2Frame : public TagField<Id3v2Frame> {
|
class TAG_PARSER_EXPORT Id3v2Frame : public TagField<Id3v2Frame> {
|
||||||
|
|
|
@ -54,8 +54,8 @@ inline uint64 Id3v2TagMaker::requiredSize() const
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits<Id3v2Tag> {
|
template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits<Id3v2Tag> {
|
||||||
public:
|
public:
|
||||||
typedef Id3v2Frame FieldType;
|
using FieldType = Id3v2Frame;
|
||||||
typedef FrameComparer Compare;
|
using Compare = FrameComparer;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TAG_PARSER_EXPORT Id3v2Tag : public FieldMapBasedTag<Id3v2Tag> {
|
class TAG_PARSER_EXPORT Id3v2Tag : public FieldMapBasedTag<Id3v2Tag> {
|
||||||
|
|
|
@ -23,9 +23,9 @@ class MatroskaContainer;
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT FileElementTraits<EbmlElement> {
|
template <> class TAG_PARSER_EXPORT FileElementTraits<EbmlElement> {
|
||||||
public:
|
public:
|
||||||
typedef MatroskaContainer ContainerType;
|
using ContainerType = MatroskaContainer;
|
||||||
typedef uint32 IdentifierType;
|
using IdentifierType = uint32;
|
||||||
typedef uint64 DataSizeType;
|
using DataSizeType = uint64;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TAG_PARSER_EXPORT EbmlElement : public GenericFileElement<EbmlElement> {
|
class TAG_PARSER_EXPORT EbmlElement : public GenericFileElement<EbmlElement> {
|
||||||
|
|
|
@ -280,7 +280,7 @@ void MatroskaTagMaker::make(ostream &stream) const
|
||||||
stream.write(t.levelName().c_str(), t.levelName().size());
|
stream.write(t.levelName().c_str(), t.levelName().size());
|
||||||
}
|
}
|
||||||
// write UIDs
|
// write UIDs
|
||||||
typedef pair<uint16, vector<uint64>> p;
|
using p = pair<uint16, vector<uint64>>;
|
||||||
for (const auto &pair : initializer_list<p>{ p(MatroskaIds::TagTrackUID, t.tracks()), p(MatroskaIds::TagEditionUID, t.editions()),
|
for (const auto &pair : initializer_list<p>{ p(MatroskaIds::TagTrackUID, t.tracks()), p(MatroskaIds::TagEditionUID, t.editions()),
|
||||||
p(MatroskaIds::TagChapterUID, t.chapters()), p(MatroskaIds::TagAttachmentUID, t.attachments()) }) {
|
p(MatroskaIds::TagChapterUID, t.chapters()), p(MatroskaIds::TagAttachmentUID, t.attachments()) }) {
|
||||||
if (!pair.second.empty()) {
|
if (!pair.second.empty()) {
|
||||||
|
|
|
@ -51,8 +51,8 @@ inline uint64 MatroskaTagMaker::requiredSize() const
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits<MatroskaTag> {
|
template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits<MatroskaTag> {
|
||||||
public:
|
public:
|
||||||
typedef MatroskaTagField FieldType;
|
using FieldType = MatroskaTagField;
|
||||||
typedef std::less<typename FieldType::IdentifierType> Compare;
|
using Compare = std::less<typename FieldType::IdentifierType>;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TAG_PARSER_EXPORT MatroskaTag : public FieldMapBasedTag<MatroskaTag> {
|
class TAG_PARSER_EXPORT MatroskaTag : public FieldMapBasedTag<MatroskaTag> {
|
||||||
|
|
|
@ -14,8 +14,8 @@ class Diagnostics;
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT TagFieldTraits<MatroskaTagField> {
|
template <> class TAG_PARSER_EXPORT TagFieldTraits<MatroskaTagField> {
|
||||||
public:
|
public:
|
||||||
typedef std::string IdentifierType;
|
using IdentifierType = std::string;
|
||||||
typedef std::string TypeInfoType;
|
using TypeInfoType = std::string;
|
||||||
static bool supportsNestedFields();
|
static bool supportsNestedFields();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,9 @@ class Mp4Container;
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT FileElementTraits<Mp4Atom> {
|
template <> class TAG_PARSER_EXPORT FileElementTraits<Mp4Atom> {
|
||||||
public:
|
public:
|
||||||
typedef Mp4Container ContainerType;
|
using ContainerType = Mp4Container;
|
||||||
typedef uint32 IdentifierType;
|
using IdentifierType = uint32;
|
||||||
typedef uint64 DataSizeType;
|
using DataSizeType = uint64;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the minimal atom size which is 8 byte.
|
* \brief Returns the minimal atom size which is 8 byte.
|
||||||
|
|
|
@ -90,8 +90,8 @@ inline uint64 Mp4TagMaker::requiredSize() const
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits<Mp4Tag> {
|
template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits<Mp4Tag> {
|
||||||
public:
|
public:
|
||||||
typedef Mp4TagField FieldType;
|
using FieldType = Mp4TagField;
|
||||||
typedef std::less<typename FieldType::IdentifierType> Compare;
|
using Compare = std::less<typename FieldType::IdentifierType>;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TAG_PARSER_EXPORT Mp4Tag : public FieldMapBasedTag<Mp4Tag> {
|
class TAG_PARSER_EXPORT Mp4Tag : public FieldMapBasedTag<Mp4Tag> {
|
||||||
|
|
|
@ -53,8 +53,8 @@ class Diagnostics;
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT TagFieldTraits<Mp4TagField> {
|
template <> class TAG_PARSER_EXPORT TagFieldTraits<Mp4TagField> {
|
||||||
public:
|
public:
|
||||||
typedef uint32 IdentifierType;
|
using IdentifierType = uint32;
|
||||||
typedef uint32 TypeInfoType;
|
using TypeInfoType = uint32;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Mp4Atom;
|
class Mp4Atom;
|
||||||
|
|
|
@ -15,9 +15,9 @@ class Mpeg4Descriptor;
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT FileElementTraits<Mpeg4Descriptor> {
|
template <> class TAG_PARSER_EXPORT FileElementTraits<Mpeg4Descriptor> {
|
||||||
public:
|
public:
|
||||||
typedef Mp4Container ContainerType;
|
using ContainerType = Mp4Container;
|
||||||
typedef byte IdentifierType;
|
using IdentifierType = byte;
|
||||||
typedef uint32 DataSizeType;
|
using DataSizeType = uint32;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the minimal descriptor size which is 2 byte.
|
* \brief Returns the minimal descriptor size which is 2 byte.
|
||||||
|
|
|
@ -20,8 +20,8 @@ TAG_PARSER_EXPORT const char *tagTargetLevelName(TagTargetLevel tagTargetLevel);
|
||||||
|
|
||||||
class TAG_PARSER_EXPORT TagTarget {
|
class TAG_PARSER_EXPORT TagTarget {
|
||||||
public:
|
public:
|
||||||
typedef uint64 IdType;
|
using IdType = uint64;
|
||||||
typedef std::vector<IdType> IdContainerType;
|
using IdContainerType = std::vector<IdType>;
|
||||||
|
|
||||||
TagTarget(uint64 level = 0, IdContainerType tracks = IdContainerType(), IdContainerType chapters = IdContainerType(),
|
TagTarget(uint64 level = 0, IdContainerType tracks = IdContainerType(), IdContainerType chapters = IdContainerType(),
|
||||||
IdContainerType editions = IdContainerType(), IdContainerType attachments = IdContainerType());
|
IdContainerType editions = IdContainerType(), IdContainerType attachments = IdContainerType());
|
||||||
|
|
|
@ -18,8 +18,8 @@ class Diagnostics;
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits<VorbisComment> {
|
template <> class TAG_PARSER_EXPORT FieldMapBasedTagTraits<VorbisComment> {
|
||||||
public:
|
public:
|
||||||
typedef VorbisCommentField FieldType;
|
using FieldType = VorbisCommentField;
|
||||||
typedef CaseInsensitiveStringComparer Compare;
|
using Compare = CaseInsensitiveStringComparer;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TAG_PARSER_EXPORT VorbisComment : public FieldMapBasedTag<VorbisComment> {
|
class TAG_PARSER_EXPORT VorbisComment : public FieldMapBasedTag<VorbisComment> {
|
||||||
|
|
|
@ -38,8 +38,8 @@ class Diagnostics;
|
||||||
*/
|
*/
|
||||||
template <> class TAG_PARSER_EXPORT TagFieldTraits<VorbisCommentField> {
|
template <> class TAG_PARSER_EXPORT TagFieldTraits<VorbisCommentField> {
|
||||||
public:
|
public:
|
||||||
typedef std::string IdentifierType;
|
using IdentifierType = std::string;
|
||||||
typedef uint32 TypeInfoType;
|
using TypeInfoType = uint32;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OggIterator;
|
class OggIterator;
|
||||||
|
|
Loading…
Reference in New Issue