mirror of
https://github.com/taglib/taglib.git
synced 2026-07-22 03:10:55 -04:00
Inspection: Variable can be made constexpr
This commit is contained in:
@@ -98,7 +98,7 @@ void PrivateFrame::parseFields(const ByteVector &data)
|
||||
|
||||
// Owner identifier is assumed to be Latin1
|
||||
|
||||
const int byteAlign = 1;
|
||||
constexpr int byteAlign = 1;
|
||||
const int endOfOwner = data.find(textDelimiter(String::Latin1), 0, byteAlign);
|
||||
|
||||
d->owner = String(data.mid(0, endOfOwner));
|
||||
|
||||
@@ -54,8 +54,8 @@ namespace
|
||||
const ID3v2::Latin1StringHandler defaultStringHandler;
|
||||
const ID3v2::Latin1StringHandler *stringHandler = &defaultStringHandler;
|
||||
|
||||
const long MinPaddingSize = 1024;
|
||||
const long MaxPaddingSize = 1024 * 1024;
|
||||
constexpr long MinPaddingSize = 1024;
|
||||
constexpr long MaxPaddingSize = 1024 * 1024;
|
||||
} // namespace
|
||||
|
||||
class ID3v2::Tag::TagPrivate
|
||||
|
||||
@@ -349,7 +349,7 @@ void MPEG::Header::parse(File *file, offset_t offset, bool checkLength)
|
||||
if(nextData.size() < 4)
|
||||
return;
|
||||
|
||||
const unsigned int HeaderMask = 0xfffe0c00;
|
||||
constexpr unsigned int HeaderMask = 0xfffe0c00;
|
||||
|
||||
const unsigned int header = data.toUInt(0, true) & HeaderMask;
|
||||
const unsigned int nextHeader = nextData.toUInt(0, true) & HeaderMask;
|
||||
|
||||
Reference in New Issue
Block a user