mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
clang-tidy: Use nullptr instead of 0
run-clang-tidy -header-filter='.*' -checks='-*,modernize-use-nullptr' -fix
This commit is contained in:
parent
9867bc947e
commit
abc6c31890
@ -58,10 +58,10 @@ public:
|
||||
APELocation(-1),
|
||||
APESize(0),
|
||||
ID3v1Location(-1),
|
||||
ID3v2Header(0),
|
||||
ID3v2Header(nullptr),
|
||||
ID3v2Location(-1),
|
||||
ID3v2Size(0),
|
||||
properties(0) {}
|
||||
properties(nullptr) {}
|
||||
|
||||
~FilePrivate()
|
||||
{
|
||||
@ -233,10 +233,10 @@ APE::Tag *APE::File::APETag(bool create)
|
||||
void APE::File::strip(int tags)
|
||||
{
|
||||
if(tags & ID3v1)
|
||||
d->tag.set(ApeID3v1Index, 0);
|
||||
d->tag.set(ApeID3v1Index, nullptr);
|
||||
|
||||
if(tags & APE)
|
||||
d->tag.set(ApeAPEIndex, 0);
|
||||
d->tag.set(ApeAPEIndex, nullptr);
|
||||
|
||||
if(!ID3v1Tag())
|
||||
APETag(true);
|
||||
|
@ -52,7 +52,7 @@ namespace
|
||||
|
||||
bool isKeyValid(const ByteVector &key)
|
||||
{
|
||||
const char *invalidKeys[] = { "ID3", "TAG", "OGGS", "MP+", 0 };
|
||||
const char *invalidKeys[] = { "ID3", "TAG", "OGGS", "MP+", nullptr };
|
||||
|
||||
// only allow printable ASCII including space (32..126)
|
||||
|
||||
@ -63,7 +63,7 @@ namespace
|
||||
}
|
||||
|
||||
const String upperKey = String(key).upper();
|
||||
for(size_t i = 0; invalidKeys[i] != 0; ++i) {
|
||||
for(size_t i = 0; invalidKeys[i] != nullptr; ++i) {
|
||||
if(upperKey == invalidKeys[i])
|
||||
return false;
|
||||
}
|
||||
@ -76,7 +76,7 @@ class APE::Tag::TagPrivate
|
||||
{
|
||||
public:
|
||||
TagPrivate() :
|
||||
file(0),
|
||||
file(nullptr),
|
||||
footerLocation(0) {}
|
||||
|
||||
File *file;
|
||||
|
@ -52,13 +52,13 @@ public:
|
||||
|
||||
FilePrivate():
|
||||
headerSize(0),
|
||||
tag(0),
|
||||
properties(0),
|
||||
contentDescriptionObject(0),
|
||||
extendedContentDescriptionObject(0),
|
||||
headerExtensionObject(0),
|
||||
metadataObject(0),
|
||||
metadataLibraryObject(0)
|
||||
tag(nullptr),
|
||||
properties(nullptr),
|
||||
contentDescriptionObject(nullptr),
|
||||
extendedContentDescriptionObject(nullptr),
|
||||
headerExtensionObject(nullptr),
|
||||
metadataObject(nullptr),
|
||||
metadataLibraryObject(nullptr)
|
||||
{
|
||||
objects.setAutoDelete(true);
|
||||
}
|
||||
@ -648,8 +648,8 @@ void ASF::File::read()
|
||||
}
|
||||
seek(2, Current);
|
||||
|
||||
FilePrivate::FilePropertiesObject *filePropertiesObject = 0;
|
||||
FilePrivate::StreamPropertiesObject *streamPropertiesObject = 0;
|
||||
FilePrivate::FilePropertiesObject *filePropertiesObject = nullptr;
|
||||
FilePrivate::StreamPropertiesObject *streamPropertiesObject = nullptr;
|
||||
for(int i = 0; i < numObjects; i++) {
|
||||
const ByteVector guid = readBlock(16);
|
||||
if(guid.size() != 16) {
|
||||
|
@ -37,7 +37,7 @@ namespace TagLib
|
||||
namespace
|
||||
{
|
||||
|
||||
inline unsigned short readWORD(File *file, bool *ok = 0)
|
||||
inline unsigned short readWORD(File *file, bool *ok = nullptr)
|
||||
{
|
||||
const ByteVector v = file->readBlock(2);
|
||||
if(v.size() != 2) {
|
||||
@ -48,7 +48,7 @@ namespace TagLib
|
||||
return v.toUShort(false);
|
||||
}
|
||||
|
||||
inline unsigned int readDWORD(File *file, bool *ok = 0)
|
||||
inline unsigned int readDWORD(File *file, bool *ok = nullptr)
|
||||
{
|
||||
const ByteVector v = file->readBlock(4);
|
||||
if(v.size() != 4) {
|
||||
@ -59,7 +59,7 @@ namespace TagLib
|
||||
return v.toUInt(false);
|
||||
}
|
||||
|
||||
inline long long readQWORD(File *file, bool *ok = 0)
|
||||
inline long long readQWORD(File *file, bool *ok = nullptr)
|
||||
{
|
||||
const ByteVector v = file->readBlock(8);
|
||||
if(v.size() != 8) {
|
||||
|
@ -71,7 +71,7 @@ int AudioProperties::sampleRate() const
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
AudioProperties::AudioProperties(ReadStyle) :
|
||||
d(0)
|
||||
d(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ namespace
|
||||
return 0;
|
||||
#else
|
||||
if(::strlen(fileName) == 0)
|
||||
return 0;
|
||||
return nullptr;
|
||||
#endif
|
||||
ResolverList::ConstIterator it = fileTypeResolvers.begin();
|
||||
for(; it != fileTypeResolvers.end(); ++it) {
|
||||
@ -81,7 +81,7 @@ namespace
|
||||
return file;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
File *detectByResolvers(IOStream* stream, bool readAudioProperties,
|
||||
@ -97,7 +97,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Detect the file type based on the file extension.
|
||||
@ -121,11 +121,11 @@ namespace
|
||||
// that a default file type resolver is created.
|
||||
|
||||
if(ext.isEmpty())
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
// .oga can be any audio in the Ogg container. So leave it to content-based detection.
|
||||
|
||||
File *file = 0;
|
||||
File *file = nullptr;
|
||||
|
||||
if(ext == "MP3")
|
||||
file = new MPEG::File(stream, ID3v2::FrameFactory::instance(), readAudioProperties, audioPropertiesStyle);
|
||||
@ -171,7 +171,7 @@ namespace
|
||||
delete file;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Detect the file type based on the actual content of the stream.
|
||||
@ -179,7 +179,7 @@ namespace
|
||||
File *detectByContent(IOStream *stream, bool readAudioProperties,
|
||||
AudioProperties::ReadStyle audioPropertiesStyle)
|
||||
{
|
||||
File *file = 0;
|
||||
File *file = nullptr;
|
||||
|
||||
if(MPEG::File::isSupported(stream))
|
||||
file = new MPEG::File(stream, ID3v2::FrameFactory::instance(), readAudioProperties, audioPropertiesStyle);
|
||||
@ -218,7 +218,7 @@ namespace
|
||||
delete file;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Internal function that supports FileRef::create().
|
||||
@ -244,7 +244,7 @@ namespace
|
||||
ext = s.substr(pos + 1).upper();
|
||||
|
||||
if(ext.isEmpty())
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
if(ext == "MP3")
|
||||
return new MPEG::File(fileName, ID3v2::FrameFactory::instance(), readAudioProperties, audioPropertiesStyle);
|
||||
@ -290,7 +290,7 @@ namespace
|
||||
if(ext == "XM")
|
||||
return new XM::File(fileName, readAudioProperties, audioPropertiesStyle);
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@ -298,8 +298,8 @@ class FileRef::FileRefPrivate : public RefCounter
|
||||
{
|
||||
public:
|
||||
FileRefPrivate() :
|
||||
file(0),
|
||||
stream(0) {}
|
||||
file(nullptr),
|
||||
stream(nullptr) {}
|
||||
|
||||
~FileRefPrivate() override {
|
||||
delete file;
|
||||
@ -354,7 +354,7 @@ Tag *FileRef::tag() const
|
||||
{
|
||||
if(isNull()) {
|
||||
debug("FileRef::tag() - Called without a valid file.");
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
return d->file->tag();
|
||||
}
|
||||
@ -363,7 +363,7 @@ AudioProperties *FileRef::audioProperties() const
|
||||
{
|
||||
if(isNull()) {
|
||||
debug("FileRef::audioProperties() - Called without a valid file.");
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
return d->file->audioProperties();
|
||||
}
|
||||
@ -490,7 +490,7 @@ void FileRef::parse(FileName fileName, bool readAudioProperties,
|
||||
// Stream have to be closed here if failed to resolve file types.
|
||||
|
||||
delete d->stream;
|
||||
d->stream = 0;
|
||||
d->stream = nullptr;
|
||||
}
|
||||
|
||||
void FileRef::parse(IOStream *stream, bool readAudioProperties,
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
ID3v2Location(-1),
|
||||
ID3v2OriginalSize(0),
|
||||
ID3v1Location(-1),
|
||||
properties(0),
|
||||
properties(nullptr),
|
||||
flacStart(0),
|
||||
streamStart(0),
|
||||
scanned(false)
|
||||
@ -199,7 +199,7 @@ bool FLAC::File::save()
|
||||
if(commentBlock && (*it)->code() == MetadataBlock::Picture) {
|
||||
// Set the new Vorbis Comment block before the first picture block
|
||||
d->blocks.insert(it, commentBlock);
|
||||
commentBlock = 0;
|
||||
commentBlock = nullptr;
|
||||
}
|
||||
++it;
|
||||
}
|
||||
@ -373,10 +373,10 @@ void FLAC::File::removePictures()
|
||||
void FLAC::File::strip(int tags)
|
||||
{
|
||||
if(tags & ID3v1)
|
||||
d->tag.set(FlacID3v1Index, 0);
|
||||
d->tag.set(FlacID3v1Index, nullptr);
|
||||
|
||||
if(tags & ID3v2)
|
||||
d->tag.set(FlacID3v2Index, 0);
|
||||
d->tag.set(FlacID3v2Index, nullptr);
|
||||
|
||||
if(tags & XiphComment) {
|
||||
xiphComment()->removeAllFields();
|
||||
@ -525,7 +525,7 @@ void FLAC::File::scan()
|
||||
return;
|
||||
}
|
||||
|
||||
MetadataBlock *block = 0;
|
||||
MetadataBlock *block = nullptr;
|
||||
|
||||
// Found the vorbis-comment
|
||||
if(blockType == MetadataBlock::VorbisComment) {
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
};
|
||||
|
||||
FLAC::MetadataBlock::MetadataBlock()
|
||||
: d(0)
|
||||
: d(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ MP4::Atom::~Atom()
|
||||
MP4::Atom *
|
||||
MP4::Atom::find(const char *name1, const char *name2, const char *name3, const char *name4)
|
||||
{
|
||||
if(name1 == 0) {
|
||||
if(name1 == nullptr) {
|
||||
return this;
|
||||
}
|
||||
for(AtomList::ConstIterator it = children.begin(); it != children.end(); ++it) {
|
||||
@ -144,7 +144,7 @@ MP4::Atom::find(const char *name1, const char *name2, const char *name3, const c
|
||||
return (*it)->find(name2, name3, name4);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MP4::AtomList
|
||||
@ -166,7 +166,7 @@ bool
|
||||
MP4::Atom::path(MP4::AtomList &path, const char *name1, const char *name2, const char *name3)
|
||||
{
|
||||
path.append(this);
|
||||
if(name1 == 0) {
|
||||
if(name1 == nullptr) {
|
||||
return true;
|
||||
}
|
||||
for(AtomList::ConstIterator it = children.begin(); it != children.end(); ++it) {
|
||||
@ -204,7 +204,7 @@ MP4::Atoms::find(const char *name1, const char *name2, const char *name3, const
|
||||
return (*it)->find(name2, name3, name4);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MP4::AtomList
|
||||
|
@ -77,8 +77,8 @@ namespace TagLib {
|
||||
public:
|
||||
Atom(File *file);
|
||||
~Atom();
|
||||
Atom *find(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0);
|
||||
bool path(AtomList &path, const char *name1, const char *name2 = 0, const char *name3 = 0);
|
||||
Atom *find(const char *name1, const char *name2 = nullptr, const char *name3 = nullptr, const char *name4 = nullptr);
|
||||
bool path(AtomList &path, const char *name1, const char *name2 = nullptr, const char *name3 = nullptr);
|
||||
AtomList findall(const char *name, bool recursive = false);
|
||||
offset_t offset;
|
||||
offset_t length;
|
||||
@ -95,8 +95,8 @@ namespace TagLib {
|
||||
public:
|
||||
Atoms(File *file);
|
||||
~Atoms();
|
||||
Atom *find(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0);
|
||||
AtomList path(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0);
|
||||
Atom *find(const char *name1, const char *name2 = nullptr, const char *name3 = nullptr, const char *name4 = nullptr);
|
||||
AtomList path(const char *name1, const char *name2 = nullptr, const char *name3 = nullptr, const char *name4 = nullptr);
|
||||
AtomList atoms;
|
||||
};
|
||||
} // namespace MP4
|
||||
|
@ -55,9 +55,9 @@ class MP4::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
tag(0),
|
||||
atoms(0),
|
||||
properties(0) {}
|
||||
tag(nullptr),
|
||||
atoms(nullptr),
|
||||
properties(nullptr) {}
|
||||
|
||||
~FilePrivate()
|
||||
{
|
||||
@ -198,5 +198,5 @@ MP4::File::strip(int tags)
|
||||
bool
|
||||
MP4::File::hasMP4Tag() const
|
||||
{
|
||||
return (d->atoms->find("moov", "udta", "meta", "ilst") != 0);
|
||||
return (d->atoms->find("moov", "udta", "meta", "ilst") != nullptr);
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ MP4::Properties::read(File *file, Atoms *atoms)
|
||||
return;
|
||||
}
|
||||
|
||||
MP4::Atom *trak = 0;
|
||||
MP4::Atom *trak = nullptr;
|
||||
ByteVector data;
|
||||
|
||||
const MP4::AtomList trakList = moov->findall("trak");
|
||||
@ -160,7 +160,7 @@ MP4::Properties::read(File *file, Atoms *atoms)
|
||||
if(data.containsAt("soun", 16)) {
|
||||
break;
|
||||
}
|
||||
trak = 0;
|
||||
trak = nullptr;
|
||||
}
|
||||
if(!trak) {
|
||||
debug("MP4: No audio tracks");
|
||||
|
@ -36,8 +36,8 @@ class MP4::Tag::TagPrivate
|
||||
{
|
||||
public:
|
||||
TagPrivate() :
|
||||
file(0),
|
||||
atoms(0) {}
|
||||
file(nullptr),
|
||||
atoms(nullptr) {}
|
||||
|
||||
TagLib::File *file;
|
||||
Atoms *atoms;
|
||||
|
@ -50,10 +50,10 @@ public:
|
||||
APELocation(-1),
|
||||
APESize(0),
|
||||
ID3v1Location(-1),
|
||||
ID3v2Header(0),
|
||||
ID3v2Header(nullptr),
|
||||
ID3v2Location(-1),
|
||||
ID3v2Size(0),
|
||||
properties(0) {}
|
||||
properties(nullptr) {}
|
||||
|
||||
~FilePrivate()
|
||||
{
|
||||
@ -241,17 +241,17 @@ APE::Tag *MPC::File::APETag(bool create)
|
||||
void MPC::File::strip(int tags)
|
||||
{
|
||||
if(tags & ID3v1)
|
||||
d->tag.set(MPCID3v1Index, 0);
|
||||
d->tag.set(MPCID3v1Index, nullptr);
|
||||
|
||||
if(tags & APE)
|
||||
d->tag.set(MPCAPEIndex, 0);
|
||||
d->tag.set(MPCAPEIndex, nullptr);
|
||||
|
||||
if(!ID3v1Tag())
|
||||
APETag(true);
|
||||
|
||||
if(tags & ID3v2) {
|
||||
delete d->ID3v2Header;
|
||||
d->ID3v2Header = 0;
|
||||
d->ID3v2Header = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class ID3v1::Tag::TagPrivate
|
||||
{
|
||||
public:
|
||||
TagPrivate() :
|
||||
file(0),
|
||||
file(nullptr),
|
||||
tagOffset(0),
|
||||
track(0),
|
||||
genre(255) {}
|
||||
|
@ -37,7 +37,7 @@ class ChapterFrame::ChapterFramePrivate
|
||||
{
|
||||
public:
|
||||
ChapterFramePrivate() :
|
||||
tagHeader(0),
|
||||
tagHeader(nullptr),
|
||||
startTime(0),
|
||||
endTime(0),
|
||||
startOffset(0),
|
||||
@ -236,7 +236,7 @@ ChapterFrame *ChapterFrame::findByElementID(const ID3v2::Tag *tag, const ByteVec
|
||||
return frame;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ChapterFrame::parseFields(const ByteVector &data)
|
||||
|
@ -136,7 +136,7 @@ CommentsFrame *CommentsFrame::findByDescription(const ID3v2::Tag *tag, const Str
|
||||
return frame;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -36,7 +36,7 @@ class TableOfContentsFrame::TableOfContentsFramePrivate
|
||||
{
|
||||
public:
|
||||
TableOfContentsFramePrivate() :
|
||||
tagHeader(0),
|
||||
tagHeader(nullptr),
|
||||
isTopLevel(false),
|
||||
isOrdered(false)
|
||||
{
|
||||
@ -262,7 +262,7 @@ TableOfContentsFrame *TableOfContentsFrame::findByElementID(const ID3v2::Tag *ta
|
||||
return frame;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
TableOfContentsFrame *TableOfContentsFrame::findTopLevel(const ID3v2::Tag *tag) // static
|
||||
@ -278,7 +278,7 @@ TableOfContentsFrame *TableOfContentsFrame::findTopLevel(const ID3v2::Tag *tag)
|
||||
return frame;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void TableOfContentsFrame::parseFields(const ByteVector &data)
|
||||
|
@ -337,7 +337,7 @@ PropertyMap TextIdentificationFrame::makeTMCLProperties() const
|
||||
|
||||
UserTextIdentificationFrame::UserTextIdentificationFrame(String::Type encoding) :
|
||||
TextIdentificationFrame("TXXX", encoding),
|
||||
d(0)
|
||||
d(nullptr)
|
||||
{
|
||||
StringList l;
|
||||
l.append(String());
|
||||
@ -354,7 +354,7 @@ UserTextIdentificationFrame::UserTextIdentificationFrame(const ByteVector &data)
|
||||
|
||||
UserTextIdentificationFrame::UserTextIdentificationFrame(const String &description, const StringList &values, String::Type encoding) :
|
||||
TextIdentificationFrame("TXXX", encoding),
|
||||
d(0)
|
||||
d(nullptr)
|
||||
{
|
||||
setDescription(description);
|
||||
setText(values);
|
||||
@ -433,7 +433,7 @@ UserTextIdentificationFrame *UserTextIdentificationFrame::find(
|
||||
if(f && f->description() == description)
|
||||
return f;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -114,7 +114,7 @@ UniqueFileIdentifierFrame *UniqueFileIdentifierFrame::findByOwner(const ID3v2::T
|
||||
return frame;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void UniqueFileIdentifierFrame::parseFields(const ByteVector &data)
|
||||
|
@ -134,7 +134,7 @@ UnsynchronizedLyricsFrame *UnsynchronizedLyricsFrame::findByDescription(const ID
|
||||
if(frame && frame->description() == d)
|
||||
return frame;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// protected members
|
||||
|
@ -185,7 +185,7 @@ UserUrlLinkFrame *UserUrlLinkFrame::find(ID3v2::Tag *tag, const String &descript
|
||||
if(f && f->description() == description)
|
||||
return f;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -34,7 +34,7 @@ class Footer::FooterPrivate
|
||||
};
|
||||
|
||||
Footer::Footer() :
|
||||
d(0)
|
||||
d(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ class Frame::FramePrivate
|
||||
{
|
||||
public:
|
||||
FramePrivate() :
|
||||
header(0)
|
||||
header(nullptr)
|
||||
{}
|
||||
|
||||
~FramePrivate()
|
||||
|
@ -214,7 +214,7 @@ namespace TagLib {
|
||||
* This is useful for reading strings sequentially.
|
||||
*/
|
||||
String readStringField(const ByteVector &data, String::Type encoding,
|
||||
int *position = 0);
|
||||
int *position = nullptr);
|
||||
|
||||
/*!
|
||||
* Checks a the list of string values to see if they can be used with the
|
||||
|
@ -130,7 +130,7 @@ Frame *FrameFactory::createFrame(const ByteVector &origData, const Header *tagHe
|
||||
header->frameSize() > data.size())
|
||||
{
|
||||
delete header;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifndef NO_ITUNES_HACKS
|
||||
@ -147,7 +147,7 @@ Frame *FrameFactory::createFrame(const ByteVector &origData, const Header *tagHe
|
||||
for(ByteVector::ConstIterator it = frameID.begin(); it != frameID.end(); it++) {
|
||||
if( (*it < 'A' || *it > 'Z') && (*it < '0' || *it > '9') ) {
|
||||
delete header;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,11 +70,11 @@ class ID3v2::Tag::TagPrivate
|
||||
{
|
||||
public:
|
||||
TagPrivate() :
|
||||
factory(0),
|
||||
file(0),
|
||||
factory(nullptr),
|
||||
file(nullptr),
|
||||
tagOffset(0),
|
||||
extendedHeader(0),
|
||||
footer(0)
|
||||
extendedHeader(nullptr),
|
||||
footer(nullptr)
|
||||
{
|
||||
frameList.setAutoDelete(true);
|
||||
}
|
||||
@ -404,7 +404,7 @@ void ID3v2::Tag::removeUnsupportedProperties(const StringList &properties)
|
||||
// delete all unknown frames of given type
|
||||
FrameList l = frameList(id);
|
||||
for(FrameList::ConstIterator fit = l.begin(); fit != l.end(); fit++)
|
||||
if (dynamic_cast<const UnknownFrame *>(*fit) != 0)
|
||||
if (dynamic_cast<const UnknownFrame *>(*fit) != nullptr)
|
||||
removeFrame(*fit);
|
||||
}
|
||||
else if(it->size() == 4){
|
||||
@ -416,7 +416,7 @@ void ID3v2::Tag::removeUnsupportedProperties(const StringList &properties)
|
||||
if(it->size() <= 5)
|
||||
continue; // invalid specification
|
||||
String description = it->substr(5);
|
||||
Frame *frame = 0;
|
||||
Frame *frame = nullptr;
|
||||
if(id == "TXXX")
|
||||
frame = UserTextIdentificationFrame::find(this, description);
|
||||
else if(id == "WXXX")
|
||||
@ -493,14 +493,14 @@ void ID3v2::Tag::downgradeFrames(FrameList *frames, FrameList *newFrames) const
|
||||
// iTunes writes and reads TSOA, TSOT, TSOP to ID3v2.3.
|
||||
static const char *unsupportedFrames[] = {
|
||||
"ASPI", "EQU2", "RVA2", "SEEK", "SIGN", "TDRL", "TDTG",
|
||||
"TMOO", "TPRO", "TSST", 0
|
||||
"TMOO", "TPRO", "TSST", nullptr
|
||||
};
|
||||
#endif
|
||||
ID3v2::TextIdentificationFrame *frameTDOR = 0;
|
||||
ID3v2::TextIdentificationFrame *frameTDRC = 0;
|
||||
ID3v2::TextIdentificationFrame *frameTIPL = 0;
|
||||
ID3v2::TextIdentificationFrame *frameTMCL = 0;
|
||||
ID3v2::TextIdentificationFrame *frameTCON = 0;
|
||||
ID3v2::TextIdentificationFrame *frameTDOR = nullptr;
|
||||
ID3v2::TextIdentificationFrame *frameTDRC = nullptr;
|
||||
ID3v2::TextIdentificationFrame *frameTIPL = nullptr;
|
||||
ID3v2::TextIdentificationFrame *frameTMCL = nullptr;
|
||||
ID3v2::TextIdentificationFrame *frameTCON = nullptr;
|
||||
|
||||
for(FrameList::ConstIterator it = d->frameList.begin(); it != d->frameList.end(); it++) {
|
||||
ID3v2::Frame *frame = *it;
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
APELocation(-1),
|
||||
APEOriginalSize(0),
|
||||
ID3v1Location(-1),
|
||||
properties(0) {}
|
||||
properties(nullptr) {}
|
||||
|
||||
~FilePrivate()
|
||||
{
|
||||
@ -89,8 +89,8 @@ namespace
|
||||
public:
|
||||
AdapterFile(IOStream *stream) : File(stream) {}
|
||||
|
||||
Tag *tag() const override { return 0; }
|
||||
AudioProperties *audioProperties() const override { return 0; }
|
||||
Tag *tag() const override { return nullptr; }
|
||||
AudioProperties *audioProperties() const override { return nullptr; }
|
||||
bool save() override { return false; }
|
||||
};
|
||||
} // namespace
|
||||
@ -343,7 +343,7 @@ bool MPEG::File::strip(int tags, bool freeMemory)
|
||||
d->ID3v2OriginalSize = 0;
|
||||
|
||||
if(freeMemory)
|
||||
d->tag.set(ID3v2Index, 0);
|
||||
d->tag.set(ID3v2Index, nullptr);
|
||||
}
|
||||
|
||||
if((tags & ID3v1) && d->ID3v1Location >= 0) {
|
||||
@ -352,7 +352,7 @@ bool MPEG::File::strip(int tags, bool freeMemory)
|
||||
d->ID3v1Location = -1;
|
||||
|
||||
if(freeMemory)
|
||||
d->tag.set(ID3v1Index, 0);
|
||||
d->tag.set(ID3v1Index, nullptr);
|
||||
}
|
||||
|
||||
if((tags & APE) && d->APELocation >= 0) {
|
||||
@ -365,7 +365,7 @@ bool MPEG::File::strip(int tags, bool freeMemory)
|
||||
d->APEOriginalSize = 0;
|
||||
|
||||
if(freeMemory)
|
||||
d->tag.set(APEIndex, 0);
|
||||
d->tag.set(APEIndex, nullptr);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -38,7 +38,7 @@ class MPEG::Properties::PropertiesPrivate
|
||||
{
|
||||
public:
|
||||
PropertiesPrivate() :
|
||||
xingHeader(0),
|
||||
xingHeader(nullptr),
|
||||
length(0),
|
||||
bitrate(0),
|
||||
sampleRate(0),
|
||||
@ -162,7 +162,7 @@ void MPEG::Properties::read(File *file)
|
||||
d->xingHeader = new XingHeader(file->readBlock(firstHeader.frameLength()));
|
||||
if(!d->xingHeader->isValid()) {
|
||||
delete d->xingHeader;
|
||||
d->xingHeader = 0;
|
||||
d->xingHeader = nullptr;
|
||||
}
|
||||
|
||||
if(d->xingHeader && firstHeader.samplesPerFrame() > 0 && firstHeader.sampleRate() > 0) {
|
||||
|
@ -39,8 +39,8 @@ class Ogg::FLAC::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
comment(0),
|
||||
properties(0),
|
||||
comment(nullptr),
|
||||
properties(nullptr),
|
||||
streamStart(0),
|
||||
streamLength(0),
|
||||
scanned(false),
|
||||
|
@ -49,8 +49,8 @@ class Ogg::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
firstPageHeader(0),
|
||||
lastPageHeader(0)
|
||||
firstPageHeader(nullptr),
|
||||
lastPageHeader(nullptr)
|
||||
{
|
||||
pages.setAutoDelete(true);
|
||||
}
|
||||
@ -131,12 +131,12 @@ const Ogg::PageHeader *Ogg::File::firstPageHeader()
|
||||
if(!d->firstPageHeader) {
|
||||
const offset_t firstPageHeaderOffset = find("OggS");
|
||||
if(firstPageHeaderOffset < 0)
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
d->firstPageHeader = new PageHeader(this, firstPageHeaderOffset);
|
||||
}
|
||||
|
||||
return d->firstPageHeader->isValid() ? d->firstPageHeader : 0;
|
||||
return d->firstPageHeader->isValid() ? d->firstPageHeader : nullptr;
|
||||
}
|
||||
|
||||
const Ogg::PageHeader *Ogg::File::lastPageHeader()
|
||||
@ -144,12 +144,12 @@ const Ogg::PageHeader *Ogg::File::lastPageHeader()
|
||||
if(!d->lastPageHeader) {
|
||||
const offset_t lastPageHeaderOffset = rfind("OggS");
|
||||
if(lastPageHeaderOffset < 0)
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
d->lastPageHeader = new PageHeader(this, lastPageHeaderOffset);
|
||||
}
|
||||
|
||||
return d->lastPageHeader->isValid() ? d->lastPageHeader : 0;
|
||||
return d->lastPageHeader->isValid() ? d->lastPageHeader : nullptr;
|
||||
}
|
||||
|
||||
bool Ogg::File::save()
|
||||
|
@ -100,7 +100,7 @@ unsigned int pageChecksum(const ByteVector &data)
|
||||
class Ogg::Page::PagePrivate
|
||||
{
|
||||
public:
|
||||
PagePrivate(File *f = 0, offset_t pageOffset = -1) :
|
||||
PagePrivate(File *f = nullptr, offset_t pageOffset = -1) :
|
||||
file(f),
|
||||
fileOffset(pageOffset),
|
||||
header(f, pageOffset),
|
||||
|
@ -52,7 +52,7 @@ namespace TagLib {
|
||||
* create a page with no (and as such, invalid) data that must be set
|
||||
* later.
|
||||
*/
|
||||
PageHeader(File *file = 0, offset_t pageOffset = -1);
|
||||
PageHeader(File *file = nullptr, offset_t pageOffset = -1);
|
||||
|
||||
/*!
|
||||
* Deletes this instance of the PageHeader.
|
||||
|
@ -41,8 +41,8 @@ class Opus::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
comment(0),
|
||||
properties(0) {}
|
||||
comment(nullptr),
|
||||
properties(nullptr) {}
|
||||
|
||||
~FilePrivate()
|
||||
{
|
||||
|
@ -41,8 +41,8 @@ class Speex::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
comment(0),
|
||||
properties(0) {}
|
||||
comment(nullptr),
|
||||
properties(nullptr) {}
|
||||
|
||||
~FilePrivate()
|
||||
{
|
||||
|
@ -38,8 +38,8 @@ class Vorbis::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
comment(0),
|
||||
properties(0) {}
|
||||
comment(nullptr),
|
||||
properties(nullptr) {}
|
||||
|
||||
~FilePrivate()
|
||||
{
|
||||
|
@ -38,8 +38,8 @@ class RIFF::AIFF::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
properties(0),
|
||||
tag(0),
|
||||
properties(nullptr),
|
||||
tag(nullptr),
|
||||
hasID3v2(false) {}
|
||||
|
||||
~FilePrivate()
|
||||
|
@ -45,7 +45,7 @@ class RIFF::WAV::File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate() :
|
||||
properties(0),
|
||||
properties(nullptr),
|
||||
hasID3v2(false),
|
||||
hasInfo(false) {}
|
||||
|
||||
|
@ -64,7 +64,7 @@ using namespace TagLib;
|
||||
class TagUnion::TagUnionPrivate
|
||||
{
|
||||
public:
|
||||
TagUnionPrivate() : tags(3, static_cast<Tag *>(0))
|
||||
TagUnionPrivate() : tags(3, static_cast<Tag *>(nullptr))
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ namespace TagLib {
|
||||
* \a third. The TagUnion takes ownership of these tags and will handle
|
||||
* their deletion.
|
||||
*/
|
||||
TagUnion(Tag *first = 0, Tag *second = 0, Tag *third = 0);
|
||||
TagUnion(Tag *first = nullptr, Tag *second = nullptr, Tag *third = nullptr);
|
||||
|
||||
~TagUnion() override;
|
||||
|
||||
|
@ -46,7 +46,7 @@ namespace TagLib {
|
||||
offset_t findAPE(File *file, offset_t id3v1Location);
|
||||
|
||||
ByteVector readHeader(IOStream *stream, unsigned int length, bool skipID3v2,
|
||||
offset_t *headerOffset = 0);
|
||||
offset_t *headerOffset = nullptr);
|
||||
} // namespace Utils
|
||||
} // namespace TagLib
|
||||
|
||||
|
@ -392,12 +392,12 @@ ByteVector &ByteVector::setData(const char *data)
|
||||
char *ByteVector::data()
|
||||
{
|
||||
detach();
|
||||
return (size() > 0) ? (&(*d->data)[d->offset]) : 0;
|
||||
return (size() > 0) ? (&(*d->data)[d->offset]) : nullptr;
|
||||
}
|
||||
|
||||
const char *ByteVector::data() const
|
||||
{
|
||||
return (size() > 0) ? (&(*d->data)[d->offset]) : 0;
|
||||
return (size() > 0) ? (&(*d->data)[d->offset]) : nullptr;
|
||||
}
|
||||
|
||||
ByteVector ByteVector::mid(unsigned int index, unsigned int length) const
|
||||
|
@ -96,7 +96,7 @@ namespace
|
||||
|
||||
typedef FILE* FileHandle;
|
||||
|
||||
const FileHandle InvalidFileHandle = 0;
|
||||
const FileHandle InvalidFileHandle = nullptr;
|
||||
|
||||
FileHandle openFile(const FileName &path, bool readOnly)
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ namespace TagLib {
|
||||
* true and returns the integer. Otherwise it sets \a *ok to false
|
||||
* and the result is undefined.
|
||||
*/
|
||||
int toInt(bool *ok = 0) const;
|
||||
int toInt(bool *ok = nullptr) const;
|
||||
|
||||
/*!
|
||||
* Returns a string with the leading and trailing whitespace stripped.
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
ID3v2Location(-1),
|
||||
ID3v2OriginalSize(0),
|
||||
ID3v1Location(-1),
|
||||
properties(0) {}
|
||||
properties(nullptr) {}
|
||||
|
||||
~FilePrivate()
|
||||
{
|
||||
@ -237,10 +237,10 @@ ID3v2::Tag *TrueAudio::File::ID3v2Tag(bool create)
|
||||
void TrueAudio::File::strip(int tags)
|
||||
{
|
||||
if(tags & ID3v1)
|
||||
d->tag.set(TrueAudioID3v1Index, 0);
|
||||
d->tag.set(TrueAudioID3v1Index, nullptr);
|
||||
|
||||
if(tags & ID3v2)
|
||||
d->tag.set(TrueAudioID3v2Index, 0);
|
||||
d->tag.set(TrueAudioID3v2Index, nullptr);
|
||||
|
||||
if(!ID3v1Tag())
|
||||
ID3v2Tag(true);
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
APELocation(-1),
|
||||
APESize(0),
|
||||
ID3v1Location(-1),
|
||||
properties(0) {}
|
||||
properties(nullptr) {}
|
||||
|
||||
~FilePrivate()
|
||||
{
|
||||
@ -221,10 +221,10 @@ APE::Tag *WavPack::File::APETag(bool create)
|
||||
void WavPack::File::strip(int tags)
|
||||
{
|
||||
if(tags & ID3v1)
|
||||
d->tag.set(WavID3v1Index, 0);
|
||||
d->tag.set(WavID3v1Index, nullptr);
|
||||
|
||||
if(tags & APE)
|
||||
d->tag.set(WavAPEIndex, 0);
|
||||
d->tag.set(WavAPEIndex, nullptr);
|
||||
|
||||
if(!ID3v1Tag())
|
||||
APETag(true);
|
||||
|
@ -34,8 +34,8 @@ using namespace TagLib;
|
||||
class PlainFile : public File {
|
||||
public:
|
||||
explicit PlainFile(FileName name) : File(name) { }
|
||||
Tag *tag() const override { return NULL; }
|
||||
AudioProperties *audioProperties() const override { return NULL; }
|
||||
Tag *tag() const override { return nullptr; }
|
||||
AudioProperties *audioProperties() const override { return nullptr; }
|
||||
bool save() override { return false; }
|
||||
void truncate(long length) { File::truncate(length); }
|
||||
|
||||
|
@ -66,7 +66,7 @@ namespace
|
||||
public:
|
||||
File *createFile(FileName, bool, AudioProperties::ReadStyle) const override
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
File *createFileFromStream(IOStream *s, bool, AudioProperties::ReadStyle) const override
|
||||
@ -391,7 +391,7 @@ public:
|
||||
{
|
||||
{
|
||||
FileRef f(TEST_FILE_PATH_C("xing.mp3"));
|
||||
CPPUNIT_ASSERT(dynamic_cast<MPEG::File *>(f.file()) != NULL);
|
||||
CPPUNIT_ASSERT(dynamic_cast<MPEG::File *>(f.file()) != nullptr);
|
||||
}
|
||||
|
||||
DummyResolver resolver;
|
||||
@ -399,7 +399,7 @@ public:
|
||||
|
||||
{
|
||||
FileRef f(TEST_FILE_PATH_C("xing.mp3"));
|
||||
CPPUNIT_ASSERT(dynamic_cast<Ogg::Vorbis::File *>(f.file()) != NULL);
|
||||
CPPUNIT_ASSERT(dynamic_cast<Ogg::Vorbis::File *>(f.file()) != nullptr);
|
||||
}
|
||||
|
||||
DummyStreamResolver streamResolver;
|
||||
@ -408,7 +408,7 @@ public:
|
||||
{
|
||||
FileStream s(TEST_FILE_PATH_C("xing.mp3"));
|
||||
FileRef f(&s);
|
||||
CPPUNIT_ASSERT(dynamic_cast<MP4::File *>(f.file()) != NULL);
|
||||
CPPUNIT_ASSERT(dynamic_cast<MP4::File *>(f.file()) != nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ class PublicFrame : public ID3v2::Frame
|
||||
public:
|
||||
PublicFrame() : ID3v2::Frame(ByteVector("XXXX\0\0\0\0\0\0", 10)) {}
|
||||
String readStringField(const ByteVector &data, String::Type encoding,
|
||||
int *position = 0)
|
||||
int *position = nullptr)
|
||||
{ return ID3v2::Frame::readStringField(data, encoding, position); }
|
||||
String toString() const override { return String(); }
|
||||
void parseFields(const ByteVector &) override {}
|
||||
@ -1242,7 +1242,7 @@ public:
|
||||
tag.removeUnsupportedProperties(properties.unsupportedData());
|
||||
CPPUNIT_ASSERT(tag.frameList("APIC").isEmpty());
|
||||
CPPUNIT_ASSERT(tag.frameList("TIPL").isEmpty());
|
||||
CPPUNIT_ASSERT_EQUAL((ID3v2::UniqueFileIdentifierFrame *)0, ID3v2::UniqueFileIdentifierFrame::findByOwner(&tag, "http://example.com"));
|
||||
CPPUNIT_ASSERT_EQUAL((ID3v2::UniqueFileIdentifierFrame *)nullptr, ID3v2::UniqueFileIdentifierFrame::findByOwner(&tag, "http://example.com"));
|
||||
CPPUNIT_ASSERT_EQUAL(frame6, ID3v2::UniqueFileIdentifierFrame::findByOwner(&tag, "http://musicbrainz.org"));
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
ScopedFileCopy copy("test", ".it");
|
||||
{
|
||||
IT::File file(copy.fileName().c_str());
|
||||
CPPUNIT_ASSERT(file.tag() != 0);
|
||||
CPPUNIT_ASSERT(file.tag() != nullptr);
|
||||
file.tag()->setTitle(titleAfter);
|
||||
file.tag()->setComment(newComment);
|
||||
file.tag()->setTrackerName("won't be saved");
|
||||
@ -104,8 +104,8 @@ private:
|
||||
IT::Properties *p = file.audioProperties();
|
||||
Mod::Tag *t = file.tag();
|
||||
|
||||
CPPUNIT_ASSERT(0 != p);
|
||||
CPPUNIT_ASSERT(0 != t);
|
||||
CPPUNIT_ASSERT(nullptr != p);
|
||||
CPPUNIT_ASSERT(nullptr != t);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( 0, p->length());
|
||||
CPPUNIT_ASSERT_EQUAL( 0, p->bitrate());
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
ScopedFileCopy copy("test", ".mod");
|
||||
{
|
||||
Mod::File file(copy.fileName().c_str());
|
||||
CPPUNIT_ASSERT(file.tag() != 0);
|
||||
CPPUNIT_ASSERT(file.tag() != nullptr);
|
||||
file.tag()->setTitle(titleAfter);
|
||||
file.tag()->setComment(newComment);
|
||||
CPPUNIT_ASSERT(file.save());
|
||||
@ -110,8 +110,8 @@ private:
|
||||
Mod::Properties *p = file.audioProperties();
|
||||
Mod::Tag *t = file.tag();
|
||||
|
||||
CPPUNIT_ASSERT(0 != p);
|
||||
CPPUNIT_ASSERT(0 != t);
|
||||
CPPUNIT_ASSERT(nullptr != p);
|
||||
CPPUNIT_ASSERT(nullptr != t);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(0, p->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, p->bitrate());
|
||||
|
@ -51,8 +51,8 @@ public:
|
||||
void setChunkData(const ByteVector &name, const ByteVector &data) {
|
||||
RIFF::File::setChunkData(name, data);
|
||||
};
|
||||
TagLib::Tag* tag() const override { return 0; };
|
||||
TagLib::AudioProperties* audioProperties() const override { return 0;};
|
||||
TagLib::Tag* tag() const override { return nullptr; };
|
||||
TagLib::AudioProperties* audioProperties() const override { return nullptr;};
|
||||
bool save() override { return false; };
|
||||
void removeChunk(unsigned int i) { RIFF::File::removeChunk(i); }
|
||||
void removeChunk(const ByteVector &name) { RIFF::File::removeChunk(name); }
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
ScopedFileCopy copy("test", ".s3m");
|
||||
{
|
||||
S3M::File file(copy.fileName().c_str());
|
||||
CPPUNIT_ASSERT(file.tag() != 0);
|
||||
CPPUNIT_ASSERT(file.tag() != nullptr);
|
||||
file.tag()->setTitle(titleAfter);
|
||||
file.tag()->setComment(newComment);
|
||||
file.tag()->setTrackerName("won't be saved");
|
||||
@ -95,8 +95,8 @@ private:
|
||||
S3M::Properties *p = file.audioProperties();
|
||||
Mod::Tag *t = file.tag();
|
||||
|
||||
CPPUNIT_ASSERT(0 != p);
|
||||
CPPUNIT_ASSERT(0 != t);
|
||||
CPPUNIT_ASSERT(nullptr != p);
|
||||
CPPUNIT_ASSERT(nullptr != t);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( 0, p->length());
|
||||
CPPUNIT_ASSERT_EQUAL( 0, p->bitrate());
|
||||
|
@ -127,8 +127,8 @@ public:
|
||||
XM::Properties *p = file.audioProperties();
|
||||
Mod::Tag *t = file.tag();
|
||||
|
||||
CPPUNIT_ASSERT(0 != p);
|
||||
CPPUNIT_ASSERT(0 != t);
|
||||
CPPUNIT_ASSERT(nullptr != p);
|
||||
CPPUNIT_ASSERT(nullptr != t);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(0, p->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, p->bitrate());
|
||||
@ -173,8 +173,8 @@ private:
|
||||
XM::Properties *p = file.audioProperties();
|
||||
Mod::Tag *t = file.tag();
|
||||
|
||||
CPPUNIT_ASSERT(0 != p);
|
||||
CPPUNIT_ASSERT(0 != t);
|
||||
CPPUNIT_ASSERT(nullptr != p);
|
||||
CPPUNIT_ASSERT(nullptr != t);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(0, p->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, p->bitrate());
|
||||
@ -203,7 +203,7 @@ private:
|
||||
ScopedFileCopy copy("test", ".xm");
|
||||
{
|
||||
XM::File file(copy.fileName().c_str());
|
||||
CPPUNIT_ASSERT(file.tag() != 0);
|
||||
CPPUNIT_ASSERT(file.tag() != nullptr);
|
||||
file.tag()->setTitle(titleAfter);
|
||||
file.tag()->setComment(comment);
|
||||
file.tag()->setTrackerName(trackerNameAfter);
|
||||
|
Loading…
x
Reference in New Issue
Block a user