mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
clang-tidy: use using instead of typedef (#1120)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
6ed0ca28db
commit
653c2fe9e1
@ -48,8 +48,7 @@ namespace TagLib {
|
||||
*
|
||||
* \see APE::Tag::itemListMap()
|
||||
*/
|
||||
typedef Map<const String, Item> ItemListMap;
|
||||
|
||||
using ItemListMap = Map<const String, Item>;
|
||||
|
||||
//! An APE tag implementation
|
||||
|
||||
|
@ -36,8 +36,8 @@ namespace TagLib {
|
||||
|
||||
namespace ASF {
|
||||
|
||||
typedef List<Attribute> AttributeList;
|
||||
typedef Map<String, AttributeList> AttributeListMap;
|
||||
using AttributeList = List<Attribute>;
|
||||
using AttributeListMap = Map<String, AttributeList>;
|
||||
|
||||
class TAGLIB_EXPORT Tag : public TagLib::Tag {
|
||||
|
||||
|
@ -197,7 +197,7 @@ namespace TagLib {
|
||||
std::unique_ptr<PicturePrivate> d;
|
||||
};
|
||||
|
||||
typedef List<Picture> PictureList;
|
||||
using PictureList = List<Picture>;
|
||||
} // namespace FLAC
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
@ -38,7 +38,7 @@
|
||||
namespace TagLib {
|
||||
namespace MP4 {
|
||||
class Atom;
|
||||
typedef TagLib::List<Atom *> AtomList;
|
||||
using AtomList = TagLib::List<Atom *>;
|
||||
|
||||
enum AtomDataType {
|
||||
TypeImplicit = 0, // for use with tags for which no type needs to be indicated because only one type is allowed
|
||||
@ -72,7 +72,7 @@ namespace TagLib {
|
||||
ByteVector data;
|
||||
};
|
||||
|
||||
typedef TagLib::List<AtomData> AtomDataList;
|
||||
using AtomDataList = TagLib::List<AtomData>;
|
||||
|
||||
class TAGLIB_EXPORT Atom
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ namespace TagLib {
|
||||
std::shared_ptr<CoverArtPrivate> d;
|
||||
};
|
||||
|
||||
typedef List<CoverArt> CoverArtList;
|
||||
using CoverArtList = List<CoverArt>;
|
||||
} // namespace MP4
|
||||
} // namespace TagLib
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
namespace TagLib {
|
||||
namespace MP4 {
|
||||
typedef TagLib::Map<String, Item> ItemMap;
|
||||
using ItemMap = TagLib::Map<String, Item>;
|
||||
|
||||
class TAGLIB_EXPORT Tag: public TagLib::Tag
|
||||
{
|
||||
|
@ -33,7 +33,7 @@
|
||||
namespace TagLib {
|
||||
namespace ID3v1 {
|
||||
|
||||
typedef Map<String, int> GenreMap;
|
||||
using GenreMap = Map<String, int>;
|
||||
|
||||
/*!
|
||||
* Returns the list of canonical ID3v1 genre names in the order that they
|
||||
|
@ -116,7 +116,7 @@ namespace TagLib {
|
||||
/*!
|
||||
* List of synchronized events.
|
||||
*/
|
||||
typedef TagLib::List<SynchedEvent> SynchedEventList;
|
||||
using SynchedEventList = TagLib::List<SynchedEvent>;
|
||||
|
||||
/*!
|
||||
* Construct an empty event timing codes frame.
|
||||
|
@ -94,7 +94,7 @@ namespace TagLib {
|
||||
/*!
|
||||
* List of synchronized lyrics.
|
||||
*/
|
||||
typedef TagLib::List<SynchedText> SynchedTextList;
|
||||
using SynchedTextList = TagLib::List<SynchedText>;
|
||||
|
||||
/*!
|
||||
* Construct an empty synchronized lyrics frame that will use the text
|
||||
|
@ -36,7 +36,7 @@ namespace TagLib {
|
||||
namespace ID3v2 {
|
||||
|
||||
class Tag;
|
||||
typedef Map<String, String> KeyConversionMap;
|
||||
using KeyConversionMap = Map<String, String>;
|
||||
|
||||
//! An ID3v2 text identification frame implementation
|
||||
|
||||
|
@ -44,8 +44,8 @@ namespace TagLib {
|
||||
class Header;
|
||||
class ExtendedHeader;
|
||||
|
||||
typedef List<Frame *> FrameList;
|
||||
typedef Map<ByteVector, FrameList> FrameListMap;
|
||||
using FrameList = List<Frame *>;
|
||||
using FrameListMap = Map<ByteVector, FrameList>;
|
||||
|
||||
//! An abstraction for the ISO-8859-1 string to data encoding in ID3v2 tags.
|
||||
|
||||
|
@ -152,7 +152,11 @@ namespace TagLib {
|
||||
#ifdef DOXYGEN
|
||||
}
|
||||
#else
|
||||
namespace Ogg { namespace Vorbis { typedef TagLib::Vorbis::File File; } }
|
||||
namespace Ogg {
|
||||
namespace Vorbis {
|
||||
using File = TagLib::Vorbis::File;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace TagLib
|
||||
|
@ -136,7 +136,11 @@ namespace TagLib {
|
||||
#ifdef DOXYGEN
|
||||
}
|
||||
#else
|
||||
namespace Ogg { namespace Vorbis { typedef TagLib::Vorbis::Properties Properties; } }
|
||||
namespace Ogg {
|
||||
namespace Vorbis {
|
||||
using Properties = TagLib::Vorbis::Properties;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace TagLib
|
||||
|
@ -50,7 +50,7 @@ namespace TagLib {
|
||||
*
|
||||
* \see XiphComment::fieldListMap()
|
||||
*/
|
||||
typedef Map<String, StringList> FieldListMap;
|
||||
using FieldListMap = Map<String, StringList>;
|
||||
|
||||
//! Ogg Vorbis comment implementation
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace TagLib {
|
||||
namespace RIFF {
|
||||
namespace Info {
|
||||
|
||||
typedef Map<ByteVector, String> FieldListMap;
|
||||
using FieldListMap = Map<ByteVector, String>;
|
||||
|
||||
//! A abstraction for the string to data encoding in Info tags.
|
||||
|
||||
|
@ -62,26 +62,26 @@ namespace TagLib {
|
||||
|
||||
// These integer types are deprecated. Do not use them.
|
||||
|
||||
typedef wchar_t wchar; // Assumed to be sufficient to store a UTF-16 char.
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned long long ulonglong;
|
||||
using wchar = wchar_t; // Assumed to be sufficient to store a UTF-16 char.
|
||||
using uchar = unsigned char;
|
||||
using ushort = unsigned short;
|
||||
using uint = unsigned int;
|
||||
using ulong = unsigned long;
|
||||
using ulonglong = unsigned long long;
|
||||
|
||||
// Offset or length type for I/O streams.
|
||||
// In Win32, always 64bit. Otherwise, equivalent to off_t.
|
||||
#ifdef _WIN32
|
||||
typedef long long offset_t;
|
||||
using offset_t = long long;
|
||||
#else
|
||||
typedef off_t offset_t;
|
||||
using offset_t = off_t;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Unfortunately std::wstring isn't defined on some systems, (i.e. GCC < 3)
|
||||
* so I'm providing something here that should be constant.
|
||||
*/
|
||||
typedef std::basic_string<wchar_t> wstring;
|
||||
using wstring = std::basic_string<wchar_t>;
|
||||
} // namespace TagLib
|
||||
|
||||
/*!
|
||||
|
@ -47,10 +47,10 @@ namespace TagLib {
|
||||
{
|
||||
public:
|
||||
#ifndef DO_NOT_DOCUMENT
|
||||
typedef std::vector<char>::iterator Iterator;
|
||||
typedef std::vector<char>::const_iterator ConstIterator;
|
||||
typedef std::vector<char>::reverse_iterator ReverseIterator;
|
||||
typedef std::vector<char>::const_reverse_iterator ConstReverseIterator;
|
||||
using Iterator = std::vector<char>::iterator;
|
||||
using ConstIterator = std::vector<char>::const_iterator;
|
||||
using ReverseIterator = std::vector<char>::reverse_iterator;
|
||||
using ConstReverseIterator = std::vector<char>::const_reverse_iterator;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
|
@ -43,8 +43,8 @@ namespace
|
||||
|
||||
// Uses Win32 native API instead of POSIX API to reduce the resource consumption.
|
||||
|
||||
typedef FileName FileNameHandle;
|
||||
typedef HANDLE FileHandle;
|
||||
using FileNameHandle = FileName;
|
||||
using FileHandle = HANDLE;
|
||||
|
||||
const FileHandle InvalidFileHandle = INVALID_HANDLE_VALUE;
|
||||
|
||||
@ -93,7 +93,7 @@ namespace
|
||||
operator FileName () const { return c_str(); }
|
||||
};
|
||||
|
||||
typedef FILE* FileHandle;
|
||||
using FileHandle = FILE *;
|
||||
|
||||
const FileHandle InvalidFileHandle = nullptr;
|
||||
|
||||
|
@ -51,7 +51,7 @@ namespace TagLib {
|
||||
const std::wstring m_wname;
|
||||
};
|
||||
#else
|
||||
typedef const char *FileName;
|
||||
using FileName = const char *;
|
||||
#endif
|
||||
|
||||
//! An abstract class that provides operations on a sequence of bytes
|
||||
|
@ -55,8 +55,8 @@ namespace TagLib {
|
||||
{
|
||||
public:
|
||||
#ifndef DO_NOT_DOCUMENT
|
||||
typedef typename std::list<T>::iterator Iterator;
|
||||
typedef typename std::list<T>::const_iterator ConstIterator;
|
||||
using Iterator = typename std::list<T>::iterator;
|
||||
using ConstIterator = typename std::list<T>::const_iterator;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
|
@ -54,11 +54,11 @@ namespace TagLib {
|
||||
// Not all the specializations of Map can use the class keyword
|
||||
// (when T is not actually a class type), so don't apply this
|
||||
// generally.
|
||||
typedef typename std::map<class Key, class T>::iterator Iterator;
|
||||
typedef typename std::map<class Key, class T>::const_iterator ConstIterator;
|
||||
using Iterator = typename std::map<class Key, class T>::iterator;
|
||||
using ConstIterator = typename std::map<class Key, class T>::const_iterator;
|
||||
#else
|
||||
typedef typename std::map<Key, T>::iterator Iterator;
|
||||
typedef typename std::map<Key, T>::const_iterator ConstIterator;
|
||||
using Iterator = typename std::map<Key, T>::iterator;
|
||||
using ConstIterator = typename std::map<Key, T>::const_iterator;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -36,7 +36,7 @@ extern template class TAGLIB_EXPORT TagLib::Map<TagLib::String, TagLib::StringLi
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
typedef Map<String,StringList> SimplePropertyMap;
|
||||
using SimplePropertyMap = Map<String, StringList>;
|
||||
|
||||
//! A map for format-independent <key,valuelist> tag representations.
|
||||
|
||||
@ -118,9 +118,8 @@ namespace TagLib {
|
||||
class TAGLIB_EXPORT PropertyMap: public SimplePropertyMap
|
||||
{
|
||||
public:
|
||||
|
||||
typedef SimplePropertyMap::Iterator Iterator;
|
||||
typedef SimplePropertyMap::ConstIterator ConstIterator;
|
||||
using Iterator = SimplePropertyMap::Iterator;
|
||||
using ConstIterator = SimplePropertyMap::ConstIterator;
|
||||
|
||||
PropertyMap();
|
||||
|
||||
|
@ -86,8 +86,8 @@ namespace TagLib {
|
||||
public:
|
||||
|
||||
#ifndef DO_NOT_DOCUMENT
|
||||
typedef TagLib::wstring::iterator Iterator;
|
||||
typedef TagLib::wstring::const_iterator ConstIterator;
|
||||
using Iterator = TagLib::wstring::iterator;
|
||||
using ConstIterator = TagLib::wstring::const_iterator;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user