]> granicus.if.org Git - taglib/commitdiff
Use a standard type rather than TagLib::wchar.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Wed, 2 Dec 2015 02:30:29 +0000 (11:30 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Wed, 2 Dec 2015 02:30:29 +0000 (11:30 +0900)
This won't break the ABI compatibility.

taglib/mpeg/id3v1/id3v1genres.cpp
taglib/toolkit/taglib.h
taglib/toolkit/tstring.cpp
taglib/toolkit/tstring.h
tests/test_ogg.cpp
tests/test_oggflac.cpp
tests/test_opus.cpp
tests/test_speex.cpp

index def91910ea86d159555eb86be39f7dadbe87cabf..1c707c30cdc04d7750a66fd8e7cd310d7ff62b15 100644 (file)
@@ -29,7 +29,7 @@ using namespace TagLib;
 
 namespace
 {
-  const wchar *genres[] = {
+  const wchar_t *genres[] = {
     L"Blues",
     L"Classic Rock",
     L"Country",
index ef7650ce58109758cfbc1754816fe2a979119c91..e9116e6df02d3be0799087a3bd9e2a936c1a077a 100644 (file)
@@ -73,7 +73,7 @@ namespace TagLib {
    * Unfortunately std::wstring isn't defined on some systems, (i.e. GCC < 3)
    * so I'm providing something here that should be constant.
    */
-  typedef std::basic_string<wchar> wstring;
+  typedef std::basic_string<wchar_t> wstring;
 }
 
 /*!
index 18b44d1a224a3b6f9a1ce49c48c88ed231a0cccc..9d68a23f4960dc4b70607b244144421206703ad3 100644 (file)
@@ -635,13 +635,13 @@ String String::number(int n) // static
   return Utils::formatString("%d", n);
 }
 
-TagLib::wchar &String::operator[](int i)
+wchar_t &String::operator[](int i)
 {
   detach();
   return d->data[i];
 }
 
-const TagLib::wchar &String::operator[](int i) const
+const wchar_t &String::operator[](int i) const
 {
   return d->data[i];
 }
index d00d4947e300b8e21f30ebb77471eedaf7326cc2..839b2f235b09013bcfee544bbb59af206faf0e76 100644 (file)
@@ -86,8 +86,8 @@ namespace TagLib {
   public:
 
 #ifndef DO_NOT_DOCUMENT
-    typedef std::basic_string<wchar>::iterator Iterator;
-    typedef std::basic_string<wchar>::const_iterator ConstIterator;
+    typedef TagLib::wstring::iterator Iterator;
+    typedef TagLib::wstring::const_iterator ConstIterator;
 #endif
 
     /**
@@ -395,12 +395,12 @@ namespace TagLib {
     /*!
      * Returns a reference to the character at position \a i.
      */
-    wchar &operator[](int i);
+    wchar_t &operator[](int i);
 
     /*!
      * Returns a const reference to the character at position \a i.
      */
-    const wchar &operator[](int i) const;
+    const wchar_t &operator[](int i) const;
 
     /*!
      * Compares each character of the String with each character of \a s and
index 6a671d48fb68e8fa7512187cadbf6d2a66a24bbb..45620d61315ed9deccdcd7105b31ec450e663569 100644 (file)
@@ -49,7 +49,7 @@ public:
 
     String longText(std::string(128 * 1024, ' ').c_str());
     for (size_t i = 0; i < longText.length(); ++i)
-      longText[i] = static_cast<wchar>(L'A' + (i % 26));
+      longText[i] = static_cast<wchar_t>(L'A' + (i % 26));
 
     {
       Vorbis::File f(newname.c_str());
index 737a7261a76f42ca5dcd1756fd24c0cad59bc685..58781ea0affff9925578fc0053a3e36947137c24 100644 (file)
@@ -54,7 +54,7 @@ public:
 
     String longText(std::string(128 * 1024, ' ').c_str());
     for(size_t i = 0; i < longText.length(); ++i)
-      longText[i] = static_cast<wchar>(L'A' + (i % 26));
+      longText[i] = static_cast<wchar_t>(L'A' + (i % 26));
 
     {
       Ogg::FLAC::File f(newname.c_str());
index 3113e55fb3db407a68749809b96ff7c8af45f11f..1d08d01796d64e2513b0098aeb03e2406e7491b0 100644 (file)
@@ -70,7 +70,7 @@ public:
 
     String longText(std::string(128 * 1024, ' ').c_str());
     for(size_t i = 0; i < longText.length(); ++i)
-      longText[i] = static_cast<wchar>(L'A' + (i % 26));
+      longText[i] = static_cast<wchar_t>(L'A' + (i % 26));
 
     {
       Ogg::Opus::File f(newname.c_str());
index 258795aba6e47682f04d08f19f18edc9d10e2f3d..2bbdbc90513dcb3c09ecb3abd7a9e595119a5cc0 100644 (file)
@@ -35,7 +35,7 @@ public:
 
     String longText(std::string(128 * 1024, ' ').c_str());
     for (size_t i = 0; i < longText.length(); ++i)
-      longText[i] = static_cast<wchar>(L'A' + (i % 26));
+      longText[i] = static_cast<wchar_t>(L'A' + (i % 26));
 
     {
       Ogg::Speex::File f(newname.c_str());