From: Robin Stocker Date: Sun, 10 Jun 2012 13:27:54 +0000 (+0200) Subject: Fix docs of MPEG::File::ID3v(1|2)Tag for inexistent tag X-Git-Tag: v1.8beta~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=382aec46f7c3c99dce41711c4e2a2875c60ecabc;p=taglib Fix docs of MPEG::File::ID3v(1|2)Tag for inexistent tag 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. --- diff --git a/taglib/mpeg/mpegfile.h b/taglib/mpeg/mpegfile.h index dbd0e017..185fced6 100644 --- a/taglib/mpeg/mpegfile.h +++ b/taglib/mpeg/mpegfile.h @@ -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 is still 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 is still owned by the MPEG::File and should not be * deleted by the user. It will be deleted when the file (object) is