]> granicus.if.org Git - taglib/commitdiff
Fix docs of MPEG::File::ID3v(1|2)Tag for inexistent tag
authorRobin Stocker <robin@nibor.org>
Sun, 10 Jun 2012 13:27:54 +0000 (15:27 +0200)
committerRobin Stocker <robin@nibor.org>
Sun, 10 Jun 2012 13:27:54 +0000 (15:27 +0200)
Since 37e2d629, the ID3v1 and ID3v2 tags are always created at the end
of MPEG::File::read. So contrary to what the documentation said, a null
pointer is never returned.

To check if a tag contains data, refer to isEmpty() in the
documentation.

taglib/mpeg/mpegfile.h

index dbd0e017a089eb885f47f892147723feff9839c0..185fced6d4704b7e1641b40285810c68a40e1ebf 100644 (file)
@@ -210,9 +210,9 @@ namespace TagLib {
       /*!
        * Returns a pointer to the ID3v2 tag of the file.
        *
-       * If \a create is false (the default) this will return a null pointer
-       * if there is no valid ID3v2 tag.  If \a create is true it will create
-       * an ID3v2 tag if one does not exist.
+       * A tag will always be returned, regardless of whether there is a
+       * tag in the file or not. Use ID3v2::Tag::isEmpty() to check if
+       * the tag contains no data.
        *
        * \note The Tag <b>is still</b> owned by the MPEG::File and should not be
        * deleted by the user.  It will be deleted when the file (object) is
@@ -223,9 +223,9 @@ namespace TagLib {
       /*!
        * Returns a pointer to the ID3v1 tag of the file.
        *
-       * If \a create is false (the default) this will return a null pointer
-       * if there is no valid ID3v1 tag.  If \a create is true it will create
-       * an ID3v1 tag if one does not exist.
+       * A tag will always be returned, regardless of whether there is a
+       * tag in the file or not. Use Tag::isEmpty() to check if
+       * the tag contains no data.
        *
        * \note The Tag <b>is still</b> owned by the MPEG::File and should not be
        * deleted by the user.  It will be deleted when the file (object) is