]> granicus.if.org Git - taglib/commitdiff
Update signature and docs to be more in-line with TagLib's style
authorScott Wheeler <scott@directededge.com>
Mon, 18 May 2015 13:35:41 +0000 (15:35 +0200)
committerScott Wheeler <scott@directededge.com>
Mon, 18 May 2015 14:00:47 +0000 (16:00 +0200)
taglib/mpeg/id3v2/frames/chapterframe.cpp
taglib/mpeg/id3v2/frames/chapterframe.h

index f96fad3039107f300005a99e0aedae984e25cd9f..ab0e3e754bf7df1d1d22a697149a3a3ab7305f06 100644 (file)
@@ -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);
 }
 
index 05bdd980872f9343df792173fc7cfaf641223dc6..2e015e5b2a4df4ffb9cc1e0e42c5016b6ec9dcee 100644 (file)
@@ -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