From 1a5d89d29e2bc3b7601fcf0ffe2bcba713dcdc8b Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Mon, 18 May 2015 15:35:41 +0200 Subject: [PATCH] Update signature and docs to be more in-line with TagLib's style --- taglib/mpeg/id3v2/frames/chapterframe.cpp | 21 ++++++++++++--------- taglib/mpeg/id3v2/frames/chapterframe.h | 19 +++++++++++++------ 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/taglib/mpeg/id3v2/frames/chapterframe.cpp b/taglib/mpeg/id3v2/frames/chapterframe.cpp index f96fad30..ab0e3e75 100644 --- a/taglib/mpeg/id3v2/frames/chapterframe.cpp +++ b/taglib/mpeg/id3v2/frames/chapterframe.cpp @@ -64,18 +64,21 @@ ChapterFrame::ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &dat setData(data); } -ChapterFrame::ChapterFrame(const ByteVector &eID, const TagLib::uint &sT, const TagLib::uint &eT, - const TagLib::uint &sO, const TagLib::uint &eO, const FrameList &eF) : +ChapterFrame::ChapterFrame(const ByteVector &elementID, + const TagLib::uint &startTime, const TagLib::uint &endTime, + const TagLib::uint &startOffset, const TagLib::uint &endOffset, + const FrameList &embeddedFrames) : ID3v2::Frame("CHAP") { d = new ChapterFramePrivate; - d->elementID = eID; - d->startTime = sT; - d->endTime = eT; - d->startOffset = sO; - d->endOffset = eO; - FrameList l = eF; - for(FrameList::ConstIterator it = l.begin(); it != l.end(); ++it) + d->elementID = elementID; + d->startTime = startTime; + d->endTime = endTime; + d->startOffset = startOffset; + d->endOffset = endOffset; + + for(FrameList::ConstIterator it = embeddedFrames.begin(); + it != embeddedFrames.end(); ++it) addEmbeddedFrame(*it); } diff --git a/taglib/mpeg/id3v2/frames/chapterframe.h b/taglib/mpeg/id3v2/frames/chapterframe.h index 05bdd980..2e015e5b 100644 --- a/taglib/mpeg/id3v2/frames/chapterframe.h +++ b/taglib/mpeg/id3v2/frames/chapterframe.h @@ -53,17 +53,24 @@ namespace TagLib { ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data); /*! - * Creates a chapter frame with the element ID \a eID, - * start time \a sT, end time \a eT, start offset \a sO, - * end offset \a eO and embedded frames, that are in \a eF. + * Creates a chapter frame with the element ID \a elementID, start time + * \a startTime, end time \a endTime, start offset \a startOffset, + * end offset \a endOffset and optionally a list of embeeded frames, + * whose ownership will then be taken over by this Frame, in + * \a embeededFrames; + * + * All times are in milliseconds. */ - ChapterFrame(const ByteVector &eID, const uint &sT, const uint &eT, const uint &sO, - const uint &eO, const FrameList &eF); + // BIC: There's no reason to use const-references with uints + ChapterFrame(const ByteVector &elementID, + const uint &startTime, const uint &endTime, + const uint &startOffset, const uint &endOffset, + const FrameList &embeddedFrames = FrameList()); /*! * Destroys the frame. */ - ~ChapterFrame(); + virtual ~ChapterFrame(); /*! * Returns the element ID of the frame. Element ID