diff --git a/id3/id3v2frame.cpp b/id3/id3v2frame.cpp index 1b5a3c6..da59a4c 100644 --- a/id3/id3v2frame.cpp +++ b/id3/id3v2frame.cpp @@ -110,7 +110,8 @@ void Id3v2Frame::parse(BinaryReader &reader, const uint32 version, const uint32 { invalidateStatus(); clear(); - string context("parsing ID3v2 frame"); + static const string defaultContext("parsing ID3v2 frame"); + string context; // parse header if(version < 3) { @@ -122,7 +123,7 @@ void Id3v2Frame::parse(BinaryReader &reader, const uint32 version, const uint32 } else { // padding reached m_padding = true; - addNotification(NotificationType::Debug, "Frame ID starts with null-byte -> padding reached.", context); + addNotification(NotificationType::Debug, "Frame ID starts with null-byte -> padding reached.", defaultContext); throw NoDataFoundException(); } @@ -150,7 +151,7 @@ void Id3v2Frame::parse(BinaryReader &reader, const uint32 version, const uint32 } else { // padding reached m_padding = true; - addNotification(NotificationType::Debug, "Frame ID starts with null-byte -> padding reached.", context); + addNotification(NotificationType::Debug, "Frame ID starts with null-byte -> padding reached.", defaultContext); throw NoDataFoundException(); } diff --git a/id3/id3v2tag.cpp b/id3/id3v2tag.cpp index 510e021..7a549a8 100644 --- a/id3/id3v2tag.cpp +++ b/id3/id3v2tag.cpp @@ -168,7 +168,7 @@ void Id3v2Tag::parse(istream &stream, const uint64 maximalSize) { // prepare parsing invalidateStatus(); - const string context("parsing ID3v2 tag"); + static const string context("parsing ID3v2 tag"); BinaryReader reader(&stream); uint64 startOffset = stream.tellg(); @@ -383,7 +383,7 @@ Id3v2TagMaker::Id3v2TagMaker(Id3v2Tag &tag) : m_framesSize(0) { tag.invalidateStatus(); - const string context("making ID3v2 tag"); + static const string context("making ID3v2 tag"); // check if version is supported // (the version could have been changed using setVersion())