diff --git a/taglib/ape/apeitem.cpp b/taglib/ape/apeitem.cpp index 442dce63..d04cc1d1 100644 --- a/taglib/ape/apeitem.cpp +++ b/taglib/ape/apeitem.cpp @@ -210,7 +210,7 @@ String APE::Item::toString() const if(d->type == Text && !isEmpty()) return d->text.front(); else - return String::null; + return String(); } bool APE::Item::isEmpty() const diff --git a/taglib/ape/apetag.cpp b/taglib/ape/apetag.cpp index 00e1bc77..170a77c8 100644 --- a/taglib/ape/apetag.cpp +++ b/taglib/ape/apetag.cpp @@ -91,35 +91,35 @@ ByteVector APE::Tag::fileIdentifier() String APE::Tag::title() const { if(d->itemListMap["TITLE"].isEmpty()) - return String::null; + return String(); return d->itemListMap["TITLE"].values().toString(); } String APE::Tag::artist() const { if(d->itemListMap["ARTIST"].isEmpty()) - return String::null; + return String(); return d->itemListMap["ARTIST"].values().toString(); } String APE::Tag::album() const { if(d->itemListMap["ALBUM"].isEmpty()) - return String::null; + return String(); return d->itemListMap["ALBUM"].values().toString(); } String APE::Tag::comment() const { if(d->itemListMap["COMMENT"].isEmpty()) - return String::null; + return String(); return d->itemListMap["COMMENT"].values().toString(); } String APE::Tag::genre() const { if(d->itemListMap["GENRE"].isEmpty()) - return String::null; + return String(); return d->itemListMap["GENRE"].values().toString(); } diff --git a/taglib/asf/asftag.cpp b/taglib/asf/asftag.cpp index 5b61a024..ea9141a3 100644 --- a/taglib/asf/asftag.cpp +++ b/taglib/asf/asftag.cpp @@ -64,7 +64,7 @@ String ASF::Tag::album() const { if(d->attributeListMap.contains("WM/AlbumTitle")) return d->attributeListMap["WM/AlbumTitle"][0].toString(); - return String::null; + return String(); } String ASF::Tag::copyright() const @@ -107,7 +107,7 @@ String ASF::Tag::genre() const { if(d->attributeListMap.contains("WM/Genre")) return d->attributeListMap["WM/Genre"][0].toString(); - return String::null; + return String(); } void ASF::Tag::setTitle(const String &value) @@ -329,16 +329,16 @@ PropertyMap ASF::Tag::setProperties(const PropertyMap &props) for(; it != origProps.end(); ++it) { if(!props.contains(it->first) || props[it->first].isEmpty()) { if(it->first == "TITLE") { - d->title = String::null; + d->title.clear(); } else if(it->first == "ARTIST") { - d->artist = String::null; + d->artist.clear(); } else if(it->first == "COMMENT") { - d->comment = String::null; + d->comment.clear(); } else if(it->first == "COPYRIGHT") { - d->copyright = String::null; + d->copyright.clear(); } else { d->attributeListMap.erase(reverseKeyMap[it->first]); diff --git a/taglib/it/itfile.cpp b/taglib/it/itfile.cpp index ad5cf0b8..51ad8ac1 100644 --- a/taglib/it/itfile.cpp +++ b/taglib/it/itfile.cpp @@ -118,7 +118,7 @@ bool IT::File::save() if(i < lines.size()) writeString(lines[i], 25); else - writeString(String::null, 25); + writeString(String(), 25); writeByte(0); } @@ -133,7 +133,7 @@ bool IT::File::save() if((TagLib::uint)(i + instrumentCount) < lines.size()) writeString(lines[i + instrumentCount], 25); else - writeString(String::null, 25); + writeString(String(), 25); writeByte(0); } diff --git a/taglib/mod/modfile.cpp b/taglib/mod/modfile.cpp index ce974c16..2741e1bf 100644 --- a/taglib/mod/modfile.cpp +++ b/taglib/mod/modfile.cpp @@ -99,7 +99,7 @@ bool Mod::File::save() } for(uint i = n; i < d->properties.instrumentCount(); ++ i) { - writeString(String::null, 22); + writeString(String(), 22); seek(8, Current); } return true; diff --git a/taglib/mod/modtag.cpp b/taglib/mod/modtag.cpp index 4b180bbb..af98fb92 100644 --- a/taglib/mod/modtag.cpp +++ b/taglib/mod/modtag.cpp @@ -55,12 +55,12 @@ String Mod::Tag::title() const String Mod::Tag::artist() const { - return String::null; + return String(); } String Mod::Tag::album() const { - return String::null; + return String(); } String Mod::Tag::comment() const @@ -70,7 +70,7 @@ String Mod::Tag::comment() const String Mod::Tag::genre() const { - return String::null; + return String(); } TagLib::uint Mod::Tag::year() const @@ -142,19 +142,19 @@ PropertyMap Mod::Tag::setProperties(const PropertyMap &origProps) d->title = properties["TITLE"].front(); oneValueSet.append("TITLE"); } else - d->title = String::null; + d->title.clear(); if(properties.contains("COMMENT")) { d->comment = properties["COMMENT"].front(); oneValueSet.append("COMMENT"); } else - d->comment = String::null; + d->comment.clear(); if(properties.contains("TRACKERNAME")) { d->trackerName = properties["TRACKERNAME"].front(); oneValueSet.append("TRACKERNAME"); } else - d->trackerName = String::null; + d->trackerName.clear(); // for each tag that has been set above, remove the first entry in the corresponding // value list. The others will be returned as unsupported by this format. diff --git a/taglib/mp4/mp4tag.cpp b/taglib/mp4/mp4tag.cpp index 005c8a4d..84219196 100644 --- a/taglib/mp4/mp4tag.cpp +++ b/taglib/mp4/mp4tag.cpp @@ -686,7 +686,7 @@ MP4::Tag::title() const { if(d->items.contains("\251nam")) return d->items["\251nam"].toStringList().toString(", "); - return String::null; + return String(); } String @@ -694,7 +694,7 @@ MP4::Tag::artist() const { if(d->items.contains("\251ART")) return d->items["\251ART"].toStringList().toString(", "); - return String::null; + return String(); } String @@ -702,7 +702,7 @@ MP4::Tag::album() const { if(d->items.contains("\251alb")) return d->items["\251alb"].toStringList().toString(", "); - return String::null; + return String(); } String @@ -710,7 +710,7 @@ MP4::Tag::comment() const { if(d->items.contains("\251cmt")) return d->items["\251cmt"].toStringList().toString(", "); - return String::null; + return String(); } String @@ -718,7 +718,7 @@ MP4::Tag::genre() const { if(d->items.contains("\251gen")) return d->items["\251gen"].toStringList().toString(", "); - return String::null; + return String(); } unsigned int diff --git a/taglib/mpeg/id3v1/id3v1tag.cpp b/taglib/mpeg/id3v1/id3v1tag.cpp index 9fc8cfd7..f4004184 100644 --- a/taglib/mpeg/id3v1/id3v1tag.cpp +++ b/taglib/mpeg/id3v1/id3v1tag.cpp @@ -184,7 +184,7 @@ void ID3v1::Tag::setGenre(const String &s) void ID3v1::Tag::setYear(TagLib::uint i) { - d->year = i > 0 ? String::number(i) : String::null; + d->year = i > 0 ? String::number(i) : String(); } void ID3v1::Tag::setTrack(TagLib::uint i) diff --git a/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp b/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp index bdcc1183..1e8a1af8 100644 --- a/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp +++ b/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp @@ -214,7 +214,7 @@ void TableOfContentsFrame::removeEmbeddedFrames(const ByteVector &id) String TableOfContentsFrame::toString() const { - return String::null; + return String(); } PropertyMap TableOfContentsFrame::asProperties() const diff --git a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp index 7eacf932..8cd0d940 100644 --- a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp +++ b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp @@ -312,8 +312,8 @@ UserTextIdentificationFrame::UserTextIdentificationFrame(String::Type encoding) d(0) { StringList l; - l.append(String::null); - l.append(String::null); + l.append(String()); + l.append(String()); setText(l); } @@ -341,7 +341,7 @@ String UserTextIdentificationFrame::description() const { return !TextIdentificationFrame::fieldList().isEmpty() ? TextIdentificationFrame::fieldList().front() - : String::null; + : String(); } StringList UserTextIdentificationFrame::fieldList() const @@ -354,7 +354,7 @@ StringList UserTextIdentificationFrame::fieldList() const void UserTextIdentificationFrame::setText(const String &text) { if(description().isEmpty()) - setDescription(String::null); + setDescription(String()); TextIdentificationFrame::setText(StringList(description()).append(text)); } @@ -362,7 +362,7 @@ void UserTextIdentificationFrame::setText(const String &text) void UserTextIdentificationFrame::setText(const StringList &fields) { if(description().isEmpty()) - setDescription(String::null); + setDescription(String()); TextIdentificationFrame::setText(StringList(description()).append(fields)); } @@ -417,7 +417,7 @@ void UserTextIdentificationFrame::checkFields() int fields = fieldList().size(); if(fields == 0) - setDescription(String::null); + setDescription(String()); if(fields <= 1) - setText(String::null); + setText(String()); } diff --git a/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.cpp b/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.cpp index a0e842e0..a986e4db 100644 --- a/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.cpp +++ b/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.cpp @@ -86,7 +86,7 @@ void UniqueFileIdentifierFrame::setIdentifier(const ByteVector &v) String UniqueFileIdentifierFrame::toString() const { - return String::null; + return String(); } PropertyMap UniqueFileIdentifierFrame::asProperties() const diff --git a/taglib/mpeg/id3v2/frames/unknownframe.cpp b/taglib/mpeg/id3v2/frames/unknownframe.cpp index 4def028b..9d059193 100644 --- a/taglib/mpeg/id3v2/frames/unknownframe.cpp +++ b/taglib/mpeg/id3v2/frames/unknownframe.cpp @@ -51,7 +51,7 @@ UnknownFrame::~UnknownFrame() String UnknownFrame::toString() const { - return String::null; + return String(); } ByteVector UnknownFrame::data() const diff --git a/taglib/mpeg/id3v2/id3v2frame.cpp b/taglib/mpeg/id3v2/id3v2frame.cpp index 1e679780..f811ed69 100644 --- a/taglib/mpeg/id3v2/id3v2frame.cpp +++ b/taglib/mpeg/id3v2/id3v2frame.cpp @@ -317,7 +317,7 @@ String Frame::readStringField(const ByteVector &data, String::Type encoding, int int end = data.find(delimiter, *position, delimiter.size()); if(end < *position) - return String::null; + return String(); String str; if(encoding == String::Latin1) diff --git a/taglib/mpeg/id3v2/id3v2framefactory.cpp b/taglib/mpeg/id3v2/id3v2framefactory.cpp index bf4b0ee8..f387e937 100644 --- a/taglib/mpeg/id3v2/id3v2framefactory.cpp +++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp @@ -516,7 +516,7 @@ void FrameFactory::updateGenre(TextIdentificationFrame *frame) const } if(newfields.isEmpty()) - fields.append(String::null); + fields.append(String()); frame->setText(newfields); diff --git a/taglib/mpeg/id3v2/id3v2tag.cpp b/taglib/mpeg/id3v2/id3v2tag.cpp index f06cfbad..be5bfd20 100644 --- a/taglib/mpeg/id3v2/id3v2tag.cpp +++ b/taglib/mpeg/id3v2/id3v2tag.cpp @@ -140,21 +140,21 @@ String ID3v2::Tag::title() const { if(!d->frameListMap["TIT2"].isEmpty()) return d->frameListMap["TIT2"].front()->toString(); - return String::null; + return String(); } String ID3v2::Tag::artist() const { if(!d->frameListMap["TPE1"].isEmpty()) return d->frameListMap["TPE1"].front()->toString(); - return String::null; + return String(); } String ID3v2::Tag::album() const { if(!d->frameListMap["TALB"].isEmpty()) return d->frameListMap["TALB"].front()->toString(); - return String::null; + return String(); } String ID3v2::Tag::comment() const @@ -162,7 +162,7 @@ String ID3v2::Tag::comment() const const FrameList &comments = d->frameListMap["COMM"]; if(comments.isEmpty()) - return String::null; + return String(); for(FrameList::ConstIterator it = comments.begin(); it != comments.end(); ++it) { @@ -184,7 +184,7 @@ String ID3v2::Tag::genre() const if(d->frameListMap["TCON"].isEmpty() || !dynamic_cast(d->frameListMap["TCON"].front())) { - return String::null; + return String(); } // ID3v2.4 lists genres as the fields in its frames field list. If the field diff --git a/taglib/ogg/xiphcomment.cpp b/taglib/ogg/xiphcomment.cpp index 1da0edac..090675c2 100644 --- a/taglib/ogg/xiphcomment.cpp +++ b/taglib/ogg/xiphcomment.cpp @@ -62,21 +62,21 @@ Ogg::XiphComment::~XiphComment() String Ogg::XiphComment::title() const { if(d->fieldListMap["TITLE"].isEmpty()) - return String::null; + return String(); return d->fieldListMap["TITLE"].toString(); } String Ogg::XiphComment::artist() const { if(d->fieldListMap["ARTIST"].isEmpty()) - return String::null; + return String(); return d->fieldListMap["ARTIST"].toString(); } String Ogg::XiphComment::album() const { if(d->fieldListMap["ALBUM"].isEmpty()) - return String::null; + return String(); return d->fieldListMap["ALBUM"].toString(); } @@ -92,13 +92,13 @@ String Ogg::XiphComment::comment() const return d->fieldListMap["COMMENT"].toString(); } - return String::null; + return String(); } String Ogg::XiphComment::genre() const { if(d->fieldListMap["GENRE"].isEmpty()) - return String::null; + return String(); return d->fieldListMap["GENRE"].toString(); } diff --git a/taglib/s3m/s3mfile.cpp b/taglib/s3m/s3mfile.cpp index 371340a5..f15d740b 100644 --- a/taglib/s3m/s3mfile.cpp +++ b/taglib/s3m/s3mfile.cpp @@ -134,7 +134,7 @@ bool S3M::File::save() if(i < lines.size()) writeString(lines[i], 27); else - writeString(String::null, 27); + writeString(String(), 27); // string terminating NUL is not optional: writeByte(0); } diff --git a/taglib/tag.cpp b/taglib/tag.cpp index d13b248f..3526226f 100644 --- a/taglib/tag.cpp +++ b/taglib/tag.cpp @@ -89,31 +89,31 @@ PropertyMap Tag::setProperties(const PropertyMap &origProps) setTitle(properties["TITLE"].front()); oneValueSet.append("TITLE"); } else - setTitle(String::null); + setTitle(String()); if(properties.contains("ARTIST")) { setArtist(properties["ARTIST"].front()); oneValueSet.append("ARTIST"); } else - setArtist(String::null); + setArtist(String()); if(properties.contains("ALBUM")) { setAlbum(properties["ALBUM"].front()); oneValueSet.append("ALBUM"); } else - setAlbum(String::null); + setAlbum(String()); if(properties.contains("COMMENT")) { setComment(properties["COMMENT"].front()); oneValueSet.append("COMMENT"); } else - setComment(String::null); + setComment(String()); if(properties.contains("GENRE")) { setGenre(properties["GENRE"].front()); oneValueSet.append("GENRE"); } else - setGenre(String::null); + setGenre(String()); if(properties.contains("DATE")) { bool ok; diff --git a/taglib/tagunion.cpp b/taglib/tagunion.cpp index a6743d14..30a53583 100644 --- a/taglib/tagunion.cpp +++ b/taglib/tagunion.cpp @@ -42,7 +42,7 @@ using namespace TagLib; return tag(1)->method(); \ if(tag(2) && !tag(2)->method().isEmpty()) \ return tag(2)->method(); \ - return String::null \ + return String(); \ #define numberUnion(method) \ if(tag(0) && tag(0)->method() > 0) \ diff --git a/taglib/toolkit/tiostream.cpp b/taglib/toolkit/tiostream.cpp index 0284aed6..72fe32a6 100644 --- a/taglib/toolkit/tiostream.cpp +++ b/taglib/toolkit/tiostream.cpp @@ -33,10 +33,10 @@ using namespace TagLib; # include "tdebug.h" # include -namespace +namespace { // Check if the running system has CreateFileW() function. - // Windows9x systems don't have CreateFileW() or can't accept Unicode file names. + // Windows9x systems don't have CreateFileW() or can't accept Unicode file names. bool supportsUnicode() { @@ -49,11 +49,11 @@ namespace } // Indicates whether the system supports Unicode file names. - - const bool SystemSupportsUnicode = supportsUnicode(); + + const bool SystemSupportsUnicode = supportsUnicode(); // Converts a UTF-16 string into a local encoding. - // This function should only be used in Windows9x systems which don't support + // This function should only be used in Windows9x systems which don't support // Unicode file names. std::string unicodeToAnsi(const wchar_t *wstr) @@ -76,52 +76,52 @@ namespace // If WinNT, stores a Unicode string into m_wname directly. // If Win9x, converts and stores it into m_name to avoid calling Unicode version functions. -FileName::FileName(const wchar_t *name) +FileName::FileName(const wchar_t *name) : m_name (SystemSupportsUnicode ? "" : unicodeToAnsi(name)) , m_wname(SystemSupportsUnicode ? name : L"") { } -FileName::FileName(const char *name) - : m_name(name) +FileName::FileName(const char *name) + : m_name(name) { } -FileName::FileName(const FileName &name) - : m_name (name.m_name) +FileName::FileName(const FileName &name) + : m_name (name.m_name) , m_wname(name.m_wname) { } -FileName::operator const wchar_t *() const -{ - return m_wname.c_str(); +FileName::operator const wchar_t *() const +{ + return m_wname.c_str(); } -FileName::operator const char *() const -{ - return m_name.c_str(); +FileName::operator const char *() const +{ + return m_name.c_str(); } -const std::wstring &FileName::wstr() const -{ - return m_wname; +const std::wstring &FileName::wstr() const +{ + return m_wname; } -const std::string &FileName::str() const -{ - return m_name; -} +const std::string &FileName::str() const +{ + return m_name; +} String FileName::toString() const { if(!m_wname.empty()) { return String(m_wname); - } + } else if(!m_name.empty()) { const int len = MultiByteToWideChar(CP_ACP, 0, m_name.c_str(), -1, NULL, 0); if(len == 0) - return String::null; + return String(); std::vector buf(len); MultiByteToWideChar(CP_ACP, 0, m_name.c_str(), -1, &buf[0], len); @@ -129,7 +129,7 @@ String FileName::toString() const return String(&buf[0]); } else { - return String::null; + return String(); } } diff --git a/taglib/toolkit/tpropertymap.cpp b/taglib/toolkit/tpropertymap.cpp index 2c696417..1c6a47d9 100644 --- a/taglib/toolkit/tpropertymap.cpp +++ b/taglib/toolkit/tpropertymap.cpp @@ -144,7 +144,8 @@ bool PropertyMap::operator!=(const PropertyMap &other) const String PropertyMap::toString() const { - String ret = ""; + String ret; + for(ConstIterator it = begin(); it != end(); ++it) ret += it->first+"="+it->second.toString(", ") + "\n"; if(!unsupported.isEmpty()) diff --git a/taglib/xm/xmfile.cpp b/taglib/xm/xmfile.cpp index 3625d213..a0bb5353 100644 --- a/taglib/xm/xmfile.cpp +++ b/taglib/xm/xmfile.cpp @@ -449,7 +449,7 @@ bool XM::File::save() seek(pos + 4); const uint len = std::min(22UL, instrumentHeaderSize - 4U); if(i >= lines.size()) - writeString(String::null, len); + writeString(String(), len); else writeString(lines[i], len); @@ -480,7 +480,7 @@ bool XM::File::save() seek(pos + 18); const uint len = std::min(sampleHeaderSize - 18U, 22UL); if(sampleNameIndex >= lines.size()) - writeString(String::null, len); + writeString(String(), len); else writeString(lines[sampleNameIndex ++], len); } diff --git a/tests/test_apetag.cpp b/tests/test_apetag.cpp index 2f027958..42475766 100644 --- a/tests/test_apetag.cpp +++ b/tests/test_apetag.cpp @@ -108,7 +108,7 @@ public: ByteVector data("Test Data"); item.setBinaryData(data); CPPUNIT_ASSERT(item.values().isEmpty()); - CPPUNIT_ASSERT_EQUAL(String::null, item.toString()); + CPPUNIT_ASSERT_EQUAL(String(), item.toString()); CPPUNIT_ASSERT_EQUAL(data, item.binaryData()); item.setValue("Test Text 2"); diff --git a/tests/test_id3v2.cpp b/tests/test_id3v2.cpp index 612dc424..c6592bbe 100644 --- a/tests/test_id3v2.cpp +++ b/tests/test_id3v2.cpp @@ -36,7 +36,7 @@ class PublicFrame : public ID3v2::Frame String readStringField(const ByteVector &data, String::Type encoding, int *positon = 0) { return ID3v2::Frame::readStringField(data, encoding, positon); } - virtual String toString() const { return String::null; } + virtual String toString() const { return String(); } virtual void parseFields(const ByteVector &) {} virtual ByteVector renderFields() const { return ByteVector(); } }; diff --git a/tests/test_it.cpp b/tests/test_it.cpp index be5680ec..3270eb25 100644 --- a/tests/test_it.cpp +++ b/tests/test_it.cpp @@ -123,10 +123,10 @@ private: CPPUNIT_ASSERT_EQUAL((TagLib::uchar)128, p->panningSeparation()); CPPUNIT_ASSERT_EQUAL((TagLib::uchar) 0, p->pitchWheelDepth()); CPPUNIT_ASSERT_EQUAL(title, t->title()); - CPPUNIT_ASSERT_EQUAL(String::null, t->artist()); - CPPUNIT_ASSERT_EQUAL(String::null, t->album()); + CPPUNIT_ASSERT_EQUAL(String(), t->artist()); + CPPUNIT_ASSERT_EQUAL(String(), t->album()); CPPUNIT_ASSERT_EQUAL(comment, t->comment()); - CPPUNIT_ASSERT_EQUAL(String::null, t->genre()); + CPPUNIT_ASSERT_EQUAL(String(), t->genre()); CPPUNIT_ASSERT_EQUAL(0U, t->year()); CPPUNIT_ASSERT_EQUAL(0U, t->track()); CPPUNIT_ASSERT_EQUAL(String("Impulse Tracker"), t->trackerName()); diff --git a/tests/test_mod.cpp b/tests/test_mod.cpp index 0a233c97..c62a870b 100644 --- a/tests/test_mod.cpp +++ b/tests/test_mod.cpp @@ -113,10 +113,10 @@ private: CPPUNIT_ASSERT_EQUAL(31U, p->instrumentCount()); CPPUNIT_ASSERT_EQUAL((uchar)1, p->lengthInPatterns()); CPPUNIT_ASSERT_EQUAL(title, t->title()); - CPPUNIT_ASSERT_EQUAL(String::null, t->artist()); - CPPUNIT_ASSERT_EQUAL(String::null, t->album()); + CPPUNIT_ASSERT_EQUAL(String(), t->artist()); + CPPUNIT_ASSERT_EQUAL(String(), t->album()); CPPUNIT_ASSERT_EQUAL(comment, t->comment()); - CPPUNIT_ASSERT_EQUAL(String::null, t->genre()); + CPPUNIT_ASSERT_EQUAL(String(), t->genre()); CPPUNIT_ASSERT_EQUAL(0U, t->year()); CPPUNIT_ASSERT_EQUAL(0U, t->track()); CPPUNIT_ASSERT_EQUAL(String("StarTrekker"), t->trackerName()); diff --git a/tests/test_s3m.cpp b/tests/test_s3m.cpp index 24a4c6e4..997c5653 100644 --- a/tests/test_s3m.cpp +++ b/tests/test_s3m.cpp @@ -110,10 +110,10 @@ private: CPPUNIT_ASSERT_EQUAL((TagLib::uchar)125, p->tempo()); CPPUNIT_ASSERT_EQUAL((TagLib::uchar) 6, p->bpmSpeed()); CPPUNIT_ASSERT_EQUAL(title, t->title()); - CPPUNIT_ASSERT_EQUAL(String::null, t->artist()); - CPPUNIT_ASSERT_EQUAL(String::null, t->album()); + CPPUNIT_ASSERT_EQUAL(String(), t->artist()); + CPPUNIT_ASSERT_EQUAL(String(), t->album()); CPPUNIT_ASSERT_EQUAL(comment, t->comment()); - CPPUNIT_ASSERT_EQUAL(String::null, t->genre()); + CPPUNIT_ASSERT_EQUAL(String(), t->genre()); CPPUNIT_ASSERT_EQUAL(0U, t->year()); CPPUNIT_ASSERT_EQUAL(0U, t->track()); CPPUNIT_ASSERT_EQUAL(String("ScreamTracker III"), t->trackerName()); diff --git a/tests/test_string.cpp b/tests/test_string.cpp index 24816af9..27839618 100644 --- a/tests/test_string.cpp +++ b/tests/test_string.cpp @@ -69,7 +69,7 @@ public: s.clear(); CPPUNIT_ASSERT(s.isEmpty()); - CPPUNIT_ASSERT(!s.isNull()); + CPPUNIT_ASSERT(!s.isNull()); // deprecated, but still worth it to check. String unicode("José Carlos", String::UTF8); CPPUNIT_ASSERT(strcmp(unicode.toCString(), "Jos\xe9 Carlos") == 0); diff --git a/tests/test_xm.cpp b/tests/test_xm.cpp index 28086533..48e6ec2c 100644 --- a/tests/test_xm.cpp +++ b/tests/test_xm.cpp @@ -139,13 +139,13 @@ public: CPPUNIT_ASSERT_EQUAL((TagLib::ushort) 6, p->tempo()); CPPUNIT_ASSERT_EQUAL((TagLib::ushort)125, p->bpmSpeed()); CPPUNIT_ASSERT_EQUAL(titleBefore, t->title()); - CPPUNIT_ASSERT_EQUAL(String::null, t->artist()); - CPPUNIT_ASSERT_EQUAL(String::null, t->album()); - CPPUNIT_ASSERT_EQUAL(String::null, t->comment()); - CPPUNIT_ASSERT_EQUAL(String::null, t->genre()); + CPPUNIT_ASSERT_EQUAL(String(), t->artist()); + CPPUNIT_ASSERT_EQUAL(String(), t->album()); + CPPUNIT_ASSERT_EQUAL(String(), t->comment()); + CPPUNIT_ASSERT_EQUAL(String(), t->genre()); CPPUNIT_ASSERT_EQUAL(0U, t->year()); CPPUNIT_ASSERT_EQUAL(0U, t->track()); - CPPUNIT_ASSERT_EQUAL(String::null, t->trackerName()); + CPPUNIT_ASSERT_EQUAL(String(), t->trackerName()); } void testWriteTagsShort() @@ -185,10 +185,10 @@ private: CPPUNIT_ASSERT_EQUAL((TagLib::ushort) 6, p->tempo()); CPPUNIT_ASSERT_EQUAL((TagLib::ushort)125, p->bpmSpeed()); CPPUNIT_ASSERT_EQUAL(title, t->title()); - CPPUNIT_ASSERT_EQUAL(String::null, t->artist()); - CPPUNIT_ASSERT_EQUAL(String::null, t->album()); + CPPUNIT_ASSERT_EQUAL(String(), t->artist()); + CPPUNIT_ASSERT_EQUAL(String(), t->album()); CPPUNIT_ASSERT_EQUAL(comment, t->comment()); - CPPUNIT_ASSERT_EQUAL(String::null, t->genre()); + CPPUNIT_ASSERT_EQUAL(String(), t->genre()); CPPUNIT_ASSERT_EQUAL(0U, t->year()); CPPUNIT_ASSERT_EQUAL(0U, t->track()); CPPUNIT_ASSERT_EQUAL(trackerName, t->trackerName());