class Header::HeaderPrivate
{
public:
- HeaderPrivate() : majorVersion(4),
- revisionNumber(0),
- unsynchronisation(false),
- extendedHeader(false),
- experimentalIndicator(false),
- footerPresent(false),
- tagSize(0) {}
-
- ~HeaderPrivate() {}
+ HeaderPrivate() :
+ majorVersion(4),
+ revisionNumber(0),
+ unsynchronisation(false),
+ extendedHeader(false),
+ experimentalIndicator(false),
+ footerPresent(false),
+ tagSize(0) {}
uint majorVersion;
uint revisionNumber;
bool footerPresent;
uint tagSize;
-
- static const uint size = 10;
};
////////////////////////////////////////////////////////////////////////////////
TagLib::uint Header::size()
{
- return HeaderPrivate::size;
+ return 10;
}
ByteVector Header::fileIdentifier()
// public members
////////////////////////////////////////////////////////////////////////////////
-Header::Header()
+Header::Header() :
+ d(new HeaderPrivate())
{
- d = new HeaderPrivate;
}
-Header::Header(const ByteVector &data)
+Header::Header(const ByteVector &data) :
+ d(new HeaderPrivate())
{
- d = new HeaderPrivate;
parse(data);
}
TagLib::uint Header::completeTagSize() const
{
if(d->footerPresent)
- return d->tagSize + d->size + Footer::size();
+ return d->tagSize + size() + Footer::size();
else
- return d->tagSize + d->size;
+ return d->tagSize + size();
}
void Header::setTagSize(uint s)
if(data.size() < size())
return;
-
// do some sanity checking -- even in ID3v2.3.0 and less the tag size is a
// synch-safe integer, so all bytes must be less than 128. If this is not
// true then this is an invalid tag.