Make context static const where possible
This commit is contained in:
parent
add833f87f
commit
424b238539
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue