From 0c6be64f8af2ba9d2d9c68fc56bd0417e35c5845 Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Sun, 6 Jun 2004 00:10:58 +0000 Subject: [PATCH] Two issues pointed out by Gary Peck: *) Note that adding and removing frames from the ID3v2::Tag will invalidate iterators on the frame list *) Correct the number of genres -- it should be 148 instead of 147. You can all have your Synthpop genre back now. :-) CCMAIL:Gary Peck git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@318067 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- mpeg/id3v1/id3v1genres.cpp | 2 +- mpeg/id3v2/id3v2tag.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mpeg/id3v1/id3v1genres.cpp b/mpeg/id3v1/id3v1genres.cpp index e1e0ca21..af20dc00 100644 --- a/mpeg/id3v1/id3v1genres.cpp +++ b/mpeg/id3v1/id3v1genres.cpp @@ -26,7 +26,7 @@ using namespace TagLib; namespace TagLib { namespace ID3v1 { - static const int genresSize = 147; + static const int genresSize = 148; static const String genres[] = { "Blues", "Classic Rock", diff --git a/mpeg/id3v2/id3v2tag.h b/mpeg/id3v2/id3v2tag.h index bcc24130..7308e117 100644 --- a/mpeg/id3v2/id3v2tag.h +++ b/mpeg/id3v2/id3v2tag.h @@ -232,17 +232,26 @@ namespace TagLib { /*! * Add a frame to the tag. At this point the tag takes ownership of * the frame and will handle freeing its memory. + * + * \note Using this method will invalidate any pointers on the list + * returned by frameList() */ void addFrame(Frame *frame); /*! * Remove a frame from the tag. If \a del is true the frame's memory * will be freed; if it is false, it must be deleted by the user. + * + * \note Using this method will invalidate any pointers on the list + * returned by frameList() */ void removeFrame(Frame *frame, bool del = true); /*! * Remove all frames of type \a id from the tag and free their memory. + * + * \note Using this method will invalidate any pointers on the list + * returned by frameList() */ void removeFrames(const ByteVector &id);