mirror of
https://github.com/taglib/taglib.git
synced 2026-04-08 07:02:49 -04:00
clang-tidy: init members by default (#1110)
Found with modernize-use-default-member-init Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@ -39,15 +39,7 @@ using TagLib::FLAC::Properties;
|
||||
class Ogg::FLAC::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
comment(nullptr),
|
||||
properties(nullptr),
|
||||
streamStart(0),
|
||||
streamLength(0),
|
||||
scanned(false),
|
||||
hasXiphComment(false),
|
||||
commentPacket(0) {}
|
||||
|
||||
FilePrivate() = default;
|
||||
~FilePrivate()
|
||||
{
|
||||
delete comment;
|
||||
@ -57,17 +49,17 @@ public:
|
||||
FilePrivate(const FilePrivate &) = delete;
|
||||
FilePrivate &operator=(const FilePrivate &) = delete;
|
||||
|
||||
Ogg::XiphComment *comment;
|
||||
Ogg::XiphComment *comment { nullptr };
|
||||
|
||||
Properties *properties;
|
||||
Properties *properties { nullptr };
|
||||
ByteVector streamInfoData;
|
||||
ByteVector xiphCommentData;
|
||||
offset_t streamStart;
|
||||
offset_t streamLength;
|
||||
bool scanned;
|
||||
offset_t streamStart { 0 };
|
||||
offset_t streamLength { 0 };
|
||||
bool scanned { false };
|
||||
|
||||
bool hasXiphComment;
|
||||
int commentPacket;
|
||||
bool hasXiphComment { false };
|
||||
int commentPacket { 0 };
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -49,9 +49,7 @@ namespace
|
||||
class Ogg::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
firstPageHeader(nullptr),
|
||||
lastPageHeader(nullptr)
|
||||
FilePrivate()
|
||||
{
|
||||
pages.setAutoDelete(true);
|
||||
}
|
||||
@ -67,8 +65,8 @@ public:
|
||||
|
||||
unsigned int streamSerialNumber;
|
||||
List<Page *> pages;
|
||||
PageHeader *firstPageHeader;
|
||||
PageHeader *lastPageHeader;
|
||||
PageHeader *firstPageHeader { nullptr };
|
||||
PageHeader *lastPageHeader { nullptr };
|
||||
Map<unsigned int, ByteVector> dirtyPackets;
|
||||
};
|
||||
|
||||
|
||||
@ -105,13 +105,14 @@ public:
|
||||
PagePrivate(File *f = nullptr, offset_t pageOffset = -1) :
|
||||
file(f),
|
||||
fileOffset(pageOffset),
|
||||
header(f, pageOffset),
|
||||
firstPacketIndex(-1) {}
|
||||
header(f, pageOffset)
|
||||
{
|
||||
}
|
||||
|
||||
File *file;
|
||||
offset_t fileOffset;
|
||||
PageHeader header;
|
||||
int firstPacketIndex;
|
||||
int firstPacketIndex { -1 };
|
||||
ByteVectorList packets;
|
||||
};
|
||||
|
||||
|
||||
@ -38,29 +38,17 @@ using namespace TagLib;
|
||||
class Ogg::PageHeader::PageHeaderPrivate
|
||||
{
|
||||
public:
|
||||
PageHeaderPrivate() :
|
||||
isValid(false),
|
||||
firstPacketContinued(false),
|
||||
lastPacketCompleted(false),
|
||||
firstPageOfStream(false),
|
||||
lastPageOfStream(false),
|
||||
absoluteGranularPosition(0),
|
||||
streamSerialNumber(0),
|
||||
pageSequenceNumber(-1),
|
||||
size(0),
|
||||
dataSize(0) {}
|
||||
|
||||
bool isValid;
|
||||
bool isValid { false };
|
||||
List<int> packetSizes;
|
||||
bool firstPacketContinued;
|
||||
bool lastPacketCompleted;
|
||||
bool firstPageOfStream;
|
||||
bool lastPageOfStream;
|
||||
long long absoluteGranularPosition;
|
||||
unsigned int streamSerialNumber;
|
||||
int pageSequenceNumber;
|
||||
int size;
|
||||
int dataSize;
|
||||
bool firstPacketContinued { false };
|
||||
bool lastPacketCompleted { false };
|
||||
bool firstPageOfStream { false };
|
||||
bool lastPageOfStream { false };
|
||||
long long absoluteGranularPosition { 0 };
|
||||
unsigned int streamSerialNumber { 0 };
|
||||
int pageSequenceNumber { -1 };
|
||||
int size { 0 };
|
||||
int dataSize { 0 };
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -40,10 +40,7 @@ using namespace TagLib::Ogg;
|
||||
class Opus::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
comment(nullptr),
|
||||
properties(nullptr) {}
|
||||
|
||||
FilePrivate() = default;
|
||||
~FilePrivate()
|
||||
{
|
||||
delete comment;
|
||||
@ -53,8 +50,8 @@ public:
|
||||
FilePrivate(const FilePrivate &) = delete;
|
||||
FilePrivate &operator=(const FilePrivate &) = delete;
|
||||
|
||||
Ogg::XiphComment *comment;
|
||||
Properties *properties;
|
||||
Ogg::XiphComment *comment { nullptr };
|
||||
Properties *properties { nullptr };
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -42,18 +42,11 @@ using namespace TagLib::Ogg;
|
||||
class Opus::Properties::PropertiesPrivate
|
||||
{
|
||||
public:
|
||||
PropertiesPrivate() :
|
||||
length(0),
|
||||
bitrate(0),
|
||||
inputSampleRate(0),
|
||||
channels(0),
|
||||
opusVersion(0) {}
|
||||
|
||||
int length;
|
||||
int bitrate;
|
||||
int inputSampleRate;
|
||||
int channels;
|
||||
int opusVersion;
|
||||
int length { 0 };
|
||||
int bitrate { 0 };
|
||||
int inputSampleRate { 0 };
|
||||
int channels { 0 };
|
||||
int opusVersion { 0 };
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -40,10 +40,7 @@ using namespace TagLib::Ogg;
|
||||
class Speex::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
comment(nullptr),
|
||||
properties(nullptr) {}
|
||||
|
||||
FilePrivate() = default;
|
||||
~FilePrivate()
|
||||
{
|
||||
delete comment;
|
||||
@ -53,8 +50,8 @@ public:
|
||||
FilePrivate(const FilePrivate &) = delete;
|
||||
FilePrivate &operator=(const FilePrivate &) = delete;
|
||||
|
||||
Ogg::XiphComment *comment;
|
||||
Properties *properties;
|
||||
Ogg::XiphComment *comment { nullptr };
|
||||
Properties *properties { nullptr };
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -42,24 +42,14 @@ using namespace TagLib::Ogg;
|
||||
class Speex::Properties::PropertiesPrivate
|
||||
{
|
||||
public:
|
||||
PropertiesPrivate() :
|
||||
length(0),
|
||||
bitrate(0),
|
||||
bitrateNominal(0),
|
||||
sampleRate(0),
|
||||
channels(0),
|
||||
speexVersion(0),
|
||||
vbr(false),
|
||||
mode(0) {}
|
||||
|
||||
int length;
|
||||
int bitrate;
|
||||
int bitrateNominal;
|
||||
int sampleRate;
|
||||
int channels;
|
||||
int speexVersion;
|
||||
bool vbr;
|
||||
int mode;
|
||||
int length { 0 };
|
||||
int bitrate { 0 };
|
||||
int bitrateNominal { 0 };
|
||||
int sampleRate { 0 };
|
||||
int channels { 0 };
|
||||
int speexVersion { 0 };
|
||||
bool vbr { false };
|
||||
int mode { 0 };
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -37,10 +37,7 @@ using namespace TagLib;
|
||||
class Vorbis::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
comment(nullptr),
|
||||
properties(nullptr) {}
|
||||
|
||||
FilePrivate() = default;
|
||||
~FilePrivate()
|
||||
{
|
||||
delete comment;
|
||||
@ -50,8 +47,8 @@ public:
|
||||
FilePrivate(const FilePrivate &) = delete;
|
||||
FilePrivate &operator=(const FilePrivate &) = delete;
|
||||
|
||||
Ogg::XiphComment *comment;
|
||||
Properties *properties;
|
||||
Ogg::XiphComment *comment { nullptr };
|
||||
Properties *properties { nullptr };
|
||||
};
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
@ -37,24 +37,14 @@ using namespace TagLib;
|
||||
class Vorbis::Properties::PropertiesPrivate
|
||||
{
|
||||
public:
|
||||
PropertiesPrivate() :
|
||||
length(0),
|
||||
bitrate(0),
|
||||
sampleRate(0),
|
||||
channels(0),
|
||||
vorbisVersion(0),
|
||||
bitrateMaximum(0),
|
||||
bitrateNominal(0),
|
||||
bitrateMinimum(0) {}
|
||||
|
||||
int length;
|
||||
int bitrate;
|
||||
int sampleRate;
|
||||
int channels;
|
||||
int vorbisVersion;
|
||||
int bitrateMaximum;
|
||||
int bitrateNominal;
|
||||
int bitrateMinimum;
|
||||
int length { 0 };
|
||||
int bitrate { 0 };
|
||||
int sampleRate { 0 };
|
||||
int channels { 0 };
|
||||
int vorbisVersion { 0 };
|
||||
int bitrateMaximum { 0 };
|
||||
int bitrateNominal { 0 };
|
||||
int bitrateMinimum { 0 };
|
||||
};
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
Reference in New Issue
Block a user