diff --git a/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp b/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp index 550df64e..5a9bf791 100644 --- a/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp +++ b/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp @@ -87,16 +87,17 @@ TableOfContentsFrame::TableOfContentsFrame(const ID3v2::Header *tagHeader, const setData(data); } -TableOfContentsFrame::TableOfContentsFrame(const ByteVector &eID, const ByteVectorList &ch, - const FrameList &eF) : +TableOfContentsFrame::TableOfContentsFrame(const ByteVector &elementID, + const ByteVectorList &children, + const FrameList &embeddedFrames) : ID3v2::Frame("CTOC") { d = new TableOfContentsFramePrivate; - d->elementID = eID; + d->elementID = elementID; strip(d->elementID); - d->childElements = ch; - FrameList l = eF; - for(FrameList::ConstIterator it = l.begin(); it != l.end(); ++it) + d->childElements = children; + + for(FrameList::ConstIterator it = embeddedFrames.begin(); it != embeddedFrames.end(); ++it) addEmbeddedFrame(*it); } diff --git a/taglib/mpeg/id3v2/frames/tableofcontentsframe.h b/taglib/mpeg/id3v2/frames/tableofcontentsframe.h index 532e1d0e..cf09a405 100644 --- a/taglib/mpeg/id3v2/frames/tableofcontentsframe.h +++ b/taglib/mpeg/id3v2/frames/tableofcontentsframe.h @@ -52,10 +52,13 @@ namespace TagLib { TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data); /*! - * Creates a table of contents frame with the element ID \a eID, - * the child elements \a ch and embedded frames, that are in \a eF. + * Creates a table of contents frame with the element ID \a elementID, + * the child elements \a children and embedded frames, which become owned + * by this frame, in \a embeddedFrames. */ - TableOfContentsFrame(const ByteVector &eID, const ByteVectorList &ch, const FrameList &eF); + TableOfContentsFrame(const ByteVector &elementID, + const ByteVectorList &children = ByteVectorList(), + const FrameList &embeddedFrames = FrameList()); /*! * Destroys the frame.