mirror of
https://github.com/taglib/taglib.git
synced 2026-03-27 17:19:49 -04:00
Always use parentheses with new. It's a bit safer.
This commit is contained in:
@ -39,10 +39,10 @@ public:
|
||||
AttributeListMap attributeListMap;
|
||||
};
|
||||
|
||||
ASF::Tag::Tag()
|
||||
: TagLib::Tag()
|
||||
ASF::Tag::Tag() :
|
||||
TagLib::Tag(),
|
||||
d(new TagPrivate())
|
||||
{
|
||||
d = new TagPrivate;
|
||||
}
|
||||
|
||||
ASF::Tag::~Tag()
|
||||
|
||||
@ -300,7 +300,7 @@ ID3v2::Tag *FLAC::File::ID3v2Tag(bool create)
|
||||
if(!create || d->tag[FlacID3v2Index])
|
||||
return static_cast<ID3v2::Tag *>(d->tag[FlacID3v2Index]);
|
||||
|
||||
d->tag.set(FlacID3v2Index, new ID3v2::Tag);
|
||||
d->tag.set(FlacID3v2Index, new ID3v2::Tag());
|
||||
return static_cast<ID3v2::Tag *>(d->tag[FlacID3v2Index]);
|
||||
}
|
||||
|
||||
|
||||
@ -50,14 +50,14 @@ public:
|
||||
ByteVector data;
|
||||
};
|
||||
|
||||
FLAC::Picture::Picture()
|
||||
FLAC::Picture::Picture() :
|
||||
d(new PicturePrivate())
|
||||
{
|
||||
d = new PicturePrivate;
|
||||
}
|
||||
|
||||
FLAC::Picture::Picture(const ByteVector &data)
|
||||
FLAC::Picture::Picture(const ByteVector &data) :
|
||||
d(new PicturePrivate())
|
||||
{
|
||||
d = new PicturePrivate;
|
||||
parse(data);
|
||||
}
|
||||
|
||||
|
||||
@ -39,11 +39,10 @@ public:
|
||||
ByteVector data;
|
||||
};
|
||||
|
||||
FLAC::UnknownMetadataBlock::UnknownMetadataBlock(int code, const ByteVector &data)
|
||||
FLAC::UnknownMetadataBlock::UnknownMetadataBlock(int code, const ByteVector &data) :
|
||||
d(new UnknownMetadataBlockPrivate())
|
||||
{
|
||||
d = new UnknownMetadataBlockPrivate;
|
||||
d->code = code;
|
||||
//debug(String(data.toHex()));
|
||||
d->data = data;
|
||||
}
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ public:
|
||||
|
||||
IT::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
|
||||
AudioProperties(propertiesStyle),
|
||||
d(new PropertiesPrivate)
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ public:
|
||||
|
||||
Mod::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
|
||||
AudioProperties(propertiesStyle),
|
||||
d(new PropertiesPrivate)
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -43,9 +43,10 @@ public:
|
||||
String trackerName;
|
||||
};
|
||||
|
||||
Mod::Tag::Tag() : TagLib::Tag()
|
||||
Mod::Tag::Tag() :
|
||||
TagLib::Tag(),
|
||||
d(new TagPrivate())
|
||||
{
|
||||
d = new TagPrivate;
|
||||
}
|
||||
|
||||
Mod::Tag::~Tag()
|
||||
|
||||
@ -48,14 +48,16 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
AttachedPictureFrame::AttachedPictureFrame() : Frame("APIC")
|
||||
AttachedPictureFrame::AttachedPictureFrame() :
|
||||
Frame("APIC"),
|
||||
d(new AttachedPictureFramePrivate())
|
||||
{
|
||||
d = new AttachedPictureFramePrivate;
|
||||
}
|
||||
|
||||
AttachedPictureFrame::AttachedPictureFrame(const ByteVector &data) : Frame(data)
|
||||
AttachedPictureFrame::AttachedPictureFrame(const ByteVector &data) :
|
||||
Frame(data),
|
||||
d(new AttachedPictureFramePrivate())
|
||||
{
|
||||
d = new AttachedPictureFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@ -169,9 +171,10 @@ ByteVector AttachedPictureFrame::renderFields() const
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
AttachedPictureFrame::AttachedPictureFrame(const ByteVector &data, Header *h) : Frame(h)
|
||||
AttachedPictureFrame::AttachedPictureFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h),
|
||||
d(new AttachedPictureFramePrivate())
|
||||
{
|
||||
d = new AttachedPictureFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
|
||||
@ -61,9 +61,9 @@ public:
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ChapterFrame::ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data) :
|
||||
ID3v2::Frame(data)
|
||||
ID3v2::Frame(data),
|
||||
d(new ChapterFramePrivate())
|
||||
{
|
||||
d = new ChapterFramePrivate;
|
||||
d->tagHeader = tagHeader;
|
||||
setData(data);
|
||||
}
|
||||
@ -72,10 +72,9 @@ ChapterFrame::ChapterFrame(const ByteVector &elementID,
|
||||
unsigned int startTime, unsigned int endTime,
|
||||
unsigned int startOffset, unsigned int endOffset,
|
||||
const FrameList &embeddedFrames) :
|
||||
ID3v2::Frame("CHAP")
|
||||
ID3v2::Frame("CHAP"),
|
||||
d(new ChapterFramePrivate())
|
||||
{
|
||||
d = new ChapterFramePrivate;
|
||||
|
||||
// setElementID has a workaround for a previously silly API where you had to
|
||||
// specifically include the null byte.
|
||||
|
||||
@ -302,9 +301,9 @@ ByteVector ChapterFrame::renderFields() const
|
||||
}
|
||||
|
||||
ChapterFrame::ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h) :
|
||||
Frame(h)
|
||||
Frame(h),
|
||||
d(new ChapterFramePrivate())
|
||||
{
|
||||
d = new ChapterFramePrivate;
|
||||
d->tagHeader = tagHeader;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -48,15 +48,17 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CommentsFrame::CommentsFrame(String::Type encoding) : Frame("COMM")
|
||||
CommentsFrame::CommentsFrame(String::Type encoding) :
|
||||
Frame("COMM"),
|
||||
d(new CommentsFramePrivate())
|
||||
{
|
||||
d = new CommentsFramePrivate;
|
||||
d->textEncoding = encoding;
|
||||
}
|
||||
|
||||
CommentsFrame::CommentsFrame(const ByteVector &data) : Frame(data)
|
||||
CommentsFrame::CommentsFrame(const ByteVector &data) :
|
||||
Frame(data),
|
||||
d(new CommentsFramePrivate())
|
||||
{
|
||||
d = new CommentsFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
|
||||
@ -46,15 +46,15 @@ public:
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
EventTimingCodesFrame::EventTimingCodesFrame() :
|
||||
Frame("ETCO")
|
||||
Frame("ETCO"),
|
||||
d(new EventTimingCodesFramePrivate())
|
||||
{
|
||||
d = new EventTimingCodesFramePrivate;
|
||||
}
|
||||
|
||||
EventTimingCodesFrame::EventTimingCodesFrame(const ByteVector &data) :
|
||||
Frame(data)
|
||||
Frame(data),
|
||||
d(new EventTimingCodesFramePrivate())
|
||||
{
|
||||
d = new EventTimingCodesFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
|
||||
@ -50,14 +50,16 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame() : Frame("GEOB")
|
||||
GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame() :
|
||||
Frame("GEOB"),
|
||||
d(new GeneralEncapsulatedObjectFramePrivate())
|
||||
{
|
||||
d = new GeneralEncapsulatedObjectFramePrivate;
|
||||
}
|
||||
|
||||
GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame(const ByteVector &data) : Frame(data)
|
||||
GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame(const ByteVector &data) :
|
||||
Frame(data),
|
||||
d(new GeneralEncapsulatedObjectFramePrivate())
|
||||
{
|
||||
d = new GeneralEncapsulatedObjectFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@ -177,8 +179,9 @@ ByteVector GeneralEncapsulatedObjectFrame::renderFields() const
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h) : Frame(h)
|
||||
GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h),
|
||||
d(new GeneralEncapsulatedObjectFramePrivate())
|
||||
{
|
||||
d = new GeneralEncapsulatedObjectFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -45,15 +45,17 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OwnershipFrame::OwnershipFrame(String::Type encoding) : Frame("OWNE")
|
||||
OwnershipFrame::OwnershipFrame(String::Type encoding) :
|
||||
Frame("OWNE"),
|
||||
d(new OwnershipFramePrivate())
|
||||
{
|
||||
d = new OwnershipFramePrivate;
|
||||
d->textEncoding = encoding;
|
||||
}
|
||||
|
||||
OwnershipFrame::OwnershipFrame(const ByteVector &data) : Frame(data)
|
||||
OwnershipFrame::OwnershipFrame(const ByteVector &data) :
|
||||
Frame(data),
|
||||
d(new OwnershipFramePrivate())
|
||||
{
|
||||
d = new OwnershipFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@ -161,8 +163,9 @@ ByteVector OwnershipFrame::renderFields() const
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OwnershipFrame::OwnershipFrame(const ByteVector &data, Header *h) : Frame(h)
|
||||
OwnershipFrame::OwnershipFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h),
|
||||
d(new OwnershipFramePrivate())
|
||||
{
|
||||
d = new OwnershipFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -38,9 +38,10 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PodcastFrame::PodcastFrame() : Frame("PCST")
|
||||
PodcastFrame::PodcastFrame() :
|
||||
Frame("PCST"),
|
||||
d(new PodcastFramePrivate())
|
||||
{
|
||||
d = new PodcastFramePrivate;
|
||||
d->fieldData = ByteVector(4, '\0');
|
||||
}
|
||||
|
||||
@ -72,8 +73,9 @@ ByteVector PodcastFrame::renderFields() const
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PodcastFrame::PodcastFrame(const ByteVector &data, Header *h) : Frame(h)
|
||||
PodcastFrame::PodcastFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h),
|
||||
d(new PodcastFramePrivate())
|
||||
{
|
||||
d = new PodcastFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -43,14 +43,16 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PopularimeterFrame::PopularimeterFrame() : Frame("POPM")
|
||||
PopularimeterFrame::PopularimeterFrame() :
|
||||
Frame("POPM"),
|
||||
d(new PopularimeterFramePrivate())
|
||||
{
|
||||
d = new PopularimeterFramePrivate;
|
||||
}
|
||||
|
||||
PopularimeterFrame::PopularimeterFrame(const ByteVector &data) : Frame(data)
|
||||
PopularimeterFrame::PopularimeterFrame(const ByteVector &data) :
|
||||
Frame(data),
|
||||
d(new PopularimeterFramePrivate())
|
||||
{
|
||||
d = new PopularimeterFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@ -130,8 +132,9 @@ ByteVector PopularimeterFrame::renderFields() const
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PopularimeterFrame::PopularimeterFrame(const ByteVector &data, Header *h) : Frame(h)
|
||||
PopularimeterFrame::PopularimeterFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h),
|
||||
d(new PopularimeterFramePrivate())
|
||||
{
|
||||
d = new PopularimeterFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -45,14 +45,16 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PrivateFrame::PrivateFrame() : Frame("PRIV")
|
||||
PrivateFrame::PrivateFrame() :
|
||||
Frame("PRIV"),
|
||||
d(new PrivateFramePrivate())
|
||||
{
|
||||
d = new PrivateFramePrivate;
|
||||
}
|
||||
|
||||
PrivateFrame::PrivateFrame(const ByteVector &data) : Frame(data)
|
||||
PrivateFrame::PrivateFrame(const ByteVector &data) :
|
||||
Frame(data),
|
||||
d(new PrivateFramePrivate())
|
||||
{
|
||||
d = new PrivateFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
|
||||
@ -51,14 +51,16 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
RelativeVolumeFrame::RelativeVolumeFrame() : Frame("RVA2")
|
||||
RelativeVolumeFrame::RelativeVolumeFrame() :
|
||||
Frame("RVA2"),
|
||||
d(new RelativeVolumeFramePrivate())
|
||||
{
|
||||
d = new RelativeVolumeFramePrivate;
|
||||
}
|
||||
|
||||
RelativeVolumeFrame::RelativeVolumeFrame(const ByteVector &data) : Frame(data)
|
||||
RelativeVolumeFrame::RelativeVolumeFrame(const ByteVector &data) :
|
||||
Frame(data),
|
||||
d(new RelativeVolumeFramePrivate())
|
||||
{
|
||||
d = new RelativeVolumeFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@ -223,8 +225,9 @@ ByteVector RelativeVolumeFrame::renderFields() const
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
RelativeVolumeFrame::RelativeVolumeFrame(const ByteVector &data, Header *h) : Frame(h)
|
||||
RelativeVolumeFrame::RelativeVolumeFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h),
|
||||
d(new RelativeVolumeFramePrivate())
|
||||
{
|
||||
d = new RelativeVolumeFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -52,16 +52,16 @@ public:
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SynchronizedLyricsFrame::SynchronizedLyricsFrame(String::Type encoding) :
|
||||
Frame("SYLT")
|
||||
Frame("SYLT"),
|
||||
d(new SynchronizedLyricsFramePrivate())
|
||||
{
|
||||
d = new SynchronizedLyricsFramePrivate;
|
||||
d->textEncoding = encoding;
|
||||
}
|
||||
|
||||
SynchronizedLyricsFrame::SynchronizedLyricsFrame(const ByteVector &data) :
|
||||
Frame(data)
|
||||
Frame(data),
|
||||
d(new SynchronizedLyricsFramePrivate())
|
||||
{
|
||||
d = new SynchronizedLyricsFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
|
||||
@ -82,9 +82,9 @@ namespace {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TableOfContentsFrame::TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data) :
|
||||
ID3v2::Frame(data)
|
||||
ID3v2::Frame(data),
|
||||
d(new TableOfContentsFramePrivate())
|
||||
{
|
||||
d = new TableOfContentsFramePrivate;
|
||||
d->tagHeader = tagHeader;
|
||||
setData(data);
|
||||
}
|
||||
@ -92,9 +92,9 @@ TableOfContentsFrame::TableOfContentsFrame(const ID3v2::Header *tagHeader, const
|
||||
TableOfContentsFrame::TableOfContentsFrame(const ByteVector &elementID,
|
||||
const ByteVectorList &children,
|
||||
const FrameList &embeddedFrames) :
|
||||
ID3v2::Frame("CTOC")
|
||||
ID3v2::Frame("CTOC"),
|
||||
d(new TableOfContentsFramePrivate())
|
||||
{
|
||||
d = new TableOfContentsFramePrivate;
|
||||
d->elementID = elementID;
|
||||
strip(d->elementID);
|
||||
d->childElements = children;
|
||||
@ -332,9 +332,9 @@ ByteVector TableOfContentsFrame::renderFields() const
|
||||
|
||||
TableOfContentsFrame::TableOfContentsFrame(const ID3v2::Header *tagHeader,
|
||||
const ByteVector &data, Header *h) :
|
||||
Frame(h)
|
||||
Frame(h),
|
||||
d(new TableOfContentsFramePrivate())
|
||||
{
|
||||
d = new TableOfContentsFramePrivate;
|
||||
d->tagHeader = tagHeader;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -45,16 +45,16 @@ public:
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TextIdentificationFrame::TextIdentificationFrame(const ByteVector &type, String::Type encoding) :
|
||||
Frame(type)
|
||||
Frame(type),
|
||||
d(new TextIdentificationFramePrivate())
|
||||
{
|
||||
d = new TextIdentificationFramePrivate;
|
||||
d->textEncoding = encoding;
|
||||
}
|
||||
|
||||
TextIdentificationFrame::TextIdentificationFrame(const ByteVector &data) :
|
||||
Frame(data)
|
||||
Frame(data),
|
||||
d(new TextIdentificationFramePrivate())
|
||||
{
|
||||
d = new TextIdentificationFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@ -252,9 +252,10 @@ ByteVector TextIdentificationFrame::renderFields() const
|
||||
// TextIdentificationFrame private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TextIdentificationFrame::TextIdentificationFrame(const ByteVector &data, Header *h) : Frame(h)
|
||||
TextIdentificationFrame::TextIdentificationFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h),
|
||||
d(new TextIdentificationFramePrivate())
|
||||
{
|
||||
d = new TextIdentificationFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
|
||||
@ -45,16 +45,16 @@ public:
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UniqueFileIdentifierFrame::UniqueFileIdentifierFrame(const ByteVector &data) :
|
||||
ID3v2::Frame(data)
|
||||
ID3v2::Frame(data),
|
||||
d(new UniqueFileIdentifierFramePrivate())
|
||||
{
|
||||
d = new UniqueFileIdentifierFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
UniqueFileIdentifierFrame::UniqueFileIdentifierFrame(const String &owner, const ByteVector &id) :
|
||||
ID3v2::Frame("UFID")
|
||||
ID3v2::Frame("UFID"),
|
||||
d(new UniqueFileIdentifierFramePrivate())
|
||||
{
|
||||
d = new UniqueFileIdentifierFramePrivate;
|
||||
d->owner = owner;
|
||||
d->identifier = id;
|
||||
}
|
||||
@ -141,8 +141,8 @@ ByteVector UniqueFileIdentifierFrame::renderFields() const
|
||||
}
|
||||
|
||||
UniqueFileIdentifierFrame::UniqueFileIdentifierFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h)
|
||||
Frame(h),
|
||||
d(new UniqueFileIdentifierFramePrivate())
|
||||
{
|
||||
d = new UniqueFileIdentifierFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -38,9 +38,10 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UnknownFrame::UnknownFrame(const ByteVector &data) : Frame(data)
|
||||
UnknownFrame::UnknownFrame(const ByteVector &data) :
|
||||
Frame(data),
|
||||
d(new UnknownFramePrivate())
|
||||
{
|
||||
d = new UnknownFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@ -77,8 +78,9 @@ ByteVector UnknownFrame::renderFields() const
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UnknownFrame::UnknownFrame(const ByteVector &data, Header *h) : Frame(h)
|
||||
UnknownFrame::UnknownFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h),
|
||||
d(new UnknownFramePrivate())
|
||||
{
|
||||
d = new UnknownFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -50,16 +50,16 @@ public:
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UnsynchronizedLyricsFrame::UnsynchronizedLyricsFrame(String::Type encoding) :
|
||||
Frame("USLT")
|
||||
Frame("USLT"),
|
||||
d(new UnsynchronizedLyricsFramePrivate())
|
||||
{
|
||||
d = new UnsynchronizedLyricsFramePrivate;
|
||||
d->textEncoding = encoding;
|
||||
}
|
||||
|
||||
UnsynchronizedLyricsFrame::UnsynchronizedLyricsFrame(const ByteVector &data) :
|
||||
Frame(data)
|
||||
Frame(data),
|
||||
d(new UnsynchronizedLyricsFramePrivate())
|
||||
{
|
||||
d = new UnsynchronizedLyricsFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
|
||||
@ -49,10 +49,14 @@ public:
|
||||
String description;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// UrlLinkFrame public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UrlLinkFrame::UrlLinkFrame(const ByteVector &data) :
|
||||
Frame(data)
|
||||
Frame(data),
|
||||
d(new UrlLinkFramePrivate())
|
||||
{
|
||||
d = new UrlLinkFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@ -93,6 +97,10 @@ PropertyMap UrlLinkFrame::asProperties() const
|
||||
return map;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// UrlLinkFrame protected members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void UrlLinkFrame::parseFields(const ByteVector &data)
|
||||
{
|
||||
d->url = String(data);
|
||||
@ -103,24 +111,28 @@ ByteVector UrlLinkFrame::renderFields() const
|
||||
return d->url.data(String::Latin1);
|
||||
}
|
||||
|
||||
UrlLinkFrame::UrlLinkFrame(const ByteVector &data, Header *h) : Frame(h)
|
||||
UrlLinkFrame::UrlLinkFrame(const ByteVector &data, Header *h) :
|
||||
Frame(h),
|
||||
d(new UrlLinkFramePrivate())
|
||||
{
|
||||
d = new UrlLinkFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// UserUrlLinkFrame public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
UserUrlLinkFrame::UserUrlLinkFrame(String::Type encoding) :
|
||||
UrlLinkFrame("WXXX")
|
||||
UrlLinkFrame("WXXX"),
|
||||
d(new UserUrlLinkFramePrivate())
|
||||
{
|
||||
d = new UserUrlLinkFramePrivate;
|
||||
d->textEncoding = encoding;
|
||||
}
|
||||
|
||||
UserUrlLinkFrame::UserUrlLinkFrame(const ByteVector &data) :
|
||||
UrlLinkFrame(data)
|
||||
UrlLinkFrame(data),
|
||||
d(new UserUrlLinkFramePrivate())
|
||||
{
|
||||
d = new UserUrlLinkFramePrivate;
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@ -176,6 +188,10 @@ UserUrlLinkFrame *UserUrlLinkFrame::find(ID3v2::Tag *tag, const String &descript
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// UserUrlLinkFrame protected members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void UserUrlLinkFrame::parseFields(const ByteVector &data)
|
||||
{
|
||||
if(data.size() < 2) {
|
||||
@ -222,8 +238,9 @@ ByteVector UserUrlLinkFrame::renderFields() const
|
||||
return v;
|
||||
}
|
||||
|
||||
UserUrlLinkFrame::UserUrlLinkFrame(const ByteVector &data, Header *h) : UrlLinkFrame(data, h)
|
||||
UserUrlLinkFrame::UserUrlLinkFrame(const ByteVector &data, Header *h) :
|
||||
UrlLinkFrame(data, h),
|
||||
d(new UserUrlLinkFramePrivate())
|
||||
{
|
||||
d = new UserUrlLinkFramePrivate;
|
||||
parseFields(fieldData(data));
|
||||
}
|
||||
|
||||
@ -198,15 +198,15 @@ ByteVector Frame::render() const
|
||||
// protected members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Frame::Frame(const ByteVector &data)
|
||||
Frame::Frame(const ByteVector &data) :
|
||||
d(new FramePrivate())
|
||||
{
|
||||
d = new FramePrivate;
|
||||
d->header = new Header(data);
|
||||
}
|
||||
|
||||
Frame::Frame(Header *h)
|
||||
Frame::Frame(Header *h) :
|
||||
d(new FramePrivate())
|
||||
{
|
||||
d = new FramePrivate;
|
||||
d->header = h;
|
||||
}
|
||||
|
||||
@ -573,15 +573,15 @@ unsigned int Frame::Header::size(unsigned int version)
|
||||
// public members (Frame::Header)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Frame::Header::Header(const ByteVector &data, bool synchSafeInts)
|
||||
Frame::Header::Header(const ByteVector &data, bool synchSafeInts) :
|
||||
d(new HeaderPrivate())
|
||||
{
|
||||
d = new HeaderPrivate;
|
||||
setData(data, synchSafeInts);
|
||||
}
|
||||
|
||||
Frame::Header::Header(const ByteVector &data, unsigned int version)
|
||||
Frame::Header::Header(const ByteVector &data, unsigned int version) :
|
||||
d(new HeaderPrivate())
|
||||
{
|
||||
d = new HeaderPrivate;
|
||||
setData(data, version);
|
||||
}
|
||||
|
||||
|
||||
@ -723,7 +723,7 @@ void ID3v2::Tag::parse(const ByteVector &origData)
|
||||
|
||||
if(d->header.extendedHeader()) {
|
||||
if(!d->extendedHeader)
|
||||
d->extendedHeader = new ExtendedHeader;
|
||||
d->extendedHeader = new ExtendedHeader();
|
||||
d->extendedHeader->setData(data);
|
||||
if(d->extendedHeader->size() <= data.size()) {
|
||||
frameDataPosition += d->extendedHeader->size();
|
||||
|
||||
@ -70,17 +70,19 @@ public:
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Ogg::FLAC::File::File(FileName file, bool readProperties,
|
||||
Properties::ReadStyle propertiesStyle) : Ogg::File(file)
|
||||
Properties::ReadStyle propertiesStyle) :
|
||||
Ogg::File(file),
|
||||
d(new FilePrivate())
|
||||
{
|
||||
d = new FilePrivate;
|
||||
if(isOpen())
|
||||
read(readProperties, propertiesStyle);
|
||||
}
|
||||
|
||||
Ogg::FLAC::File::File(IOStream *stream, bool readProperties,
|
||||
Properties::ReadStyle propertiesStyle) : Ogg::File(stream)
|
||||
Properties::ReadStyle propertiesStyle) :
|
||||
Ogg::File(stream),
|
||||
d(new FilePrivate())
|
||||
{
|
||||
d = new FilePrivate;
|
||||
if(isOpen())
|
||||
read(readProperties, propertiesStyle);
|
||||
}
|
||||
@ -172,7 +174,7 @@ void Ogg::FLAC::File::read(bool readProperties, Properties::ReadStyle properties
|
||||
if(d->hasXiphComment)
|
||||
d->comment = new Ogg::XiphComment(xiphCommentData());
|
||||
else
|
||||
d->comment = new Ogg::XiphComment;
|
||||
d->comment = new Ogg::XiphComment();
|
||||
|
||||
|
||||
if(readProperties)
|
||||
|
||||
@ -101,7 +101,7 @@ Opus::Properties *Opus::File::audioProperties() const
|
||||
bool Opus::File::save()
|
||||
{
|
||||
if(!d->comment)
|
||||
d->comment = new Ogg::XiphComment;
|
||||
d->comment = new Ogg::XiphComment();
|
||||
|
||||
setPacket(1, ByteVector("OpusTags", 8) + d->comment->render(false));
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ Speex::Properties *Speex::File::audioProperties() const
|
||||
bool Speex::File::save()
|
||||
{
|
||||
if(!d->comment)
|
||||
d->comment = new Ogg::XiphComment;
|
||||
d->comment = new Ogg::XiphComment();
|
||||
|
||||
setPacket(1, d->comment->render());
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ bool Vorbis::File::save()
|
||||
ByteVector v(vorbisCommentHeaderID);
|
||||
|
||||
if(!d->comment)
|
||||
d->comment = new Ogg::XiphComment;
|
||||
d->comment = new Ogg::XiphComment();
|
||||
v.append(d->comment->render());
|
||||
|
||||
setPacket(1, v);
|
||||
|
||||
@ -64,7 +64,7 @@ public:
|
||||
|
||||
S3M::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
|
||||
AudioProperties(propertiesStyle),
|
||||
d(new PropertiesPrivate)
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -79,10 +79,9 @@ public:
|
||||
std::vector<Tag *> tags;
|
||||
};
|
||||
|
||||
TagUnion::TagUnion(Tag *first, Tag *second, Tag *third)
|
||||
TagUnion::TagUnion(Tag *first, Tag *second, Tag *third) :
|
||||
d(new TagUnionPrivate())
|
||||
{
|
||||
d = new TagUnionPrivate;
|
||||
|
||||
d->tags[0] = first;
|
||||
d->tags[1] = second;
|
||||
d->tags[2] = third;
|
||||
|
||||
@ -60,7 +60,7 @@ public:
|
||||
|
||||
XM::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
|
||||
AudioProperties(propertiesStyle),
|
||||
d(new PropertiesPrivate)
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user