diff --git a/taglib/ape/apefooter.cpp b/taglib/ape/apefooter.cpp index d54ddfe4..d18ac59b 100644 --- a/taglib/ape/apefooter.cpp +++ b/taglib/ape/apefooter.cpp @@ -28,6 +28,8 @@ #include +#include "taglib.h" + using namespace TagLib; using namespace APE; diff --git a/taglib/ape/apetag.h b/taglib/ape/apetag.h index f3a52805..804b130f 100644 --- a/taglib/ape/apetag.h +++ b/taglib/ape/apetag.h @@ -29,6 +29,7 @@ #include "tbytevector.h" #include "tmap.h" #include "tstring.h" +#include "taglib.h" #include "taglib_export.h" #include "tag.h" #include "apeitem.h" diff --git a/taglib/mpeg/id3v1/id3v1tag.h b/taglib/mpeg/id3v1/id3v1tag.h index e3fd4dd3..e85023ef 100644 --- a/taglib/mpeg/id3v1/id3v1tag.h +++ b/taglib/mpeg/id3v1/id3v1tag.h @@ -27,6 +27,7 @@ #define TAGLIB_ID3V1TAG_H #include "tbytevector.h" +#include "taglib.h" #include "taglib_export.h" #include "tag.h" diff --git a/taglib/mpeg/id3v2/id3v2tag.h b/taglib/mpeg/id3v2/id3v2tag.h index f99f6218..20fa0b7a 100644 --- a/taglib/mpeg/id3v2/id3v2tag.h +++ b/taglib/mpeg/id3v2/id3v2tag.h @@ -30,6 +30,7 @@ #include "tstring.h" #include "tlist.h" #include "tmap.h" +#include "taglib.h" #include "taglib_export.h" #include "tag.h" #include "id3v2.h" diff --git a/taglib/ogg/oggpage.h b/taglib/ogg/oggpage.h index 8c5e60aa..64ac01c9 100644 --- a/taglib/ogg/oggpage.h +++ b/taglib/ogg/oggpage.h @@ -27,6 +27,7 @@ #define TAGLIB_OGGPAGE_H #include "tbytevectorlist.h" +#include "taglib.h" #include "taglib_export.h" namespace TagLib { diff --git a/taglib/ogg/oggpageheader.h b/taglib/ogg/oggpageheader.h index ae45a2df..a17e4e5d 100644 --- a/taglib/ogg/oggpageheader.h +++ b/taglib/ogg/oggpageheader.h @@ -28,6 +28,7 @@ #include "tlist.h" #include "tbytevector.h" +#include "taglib.h" #include "taglib_export.h" namespace TagLib { diff --git a/taglib/tagutils.h b/taglib/tagutils.h index 4532a18c..e73d2c06 100644 --- a/taglib/tagutils.h +++ b/taglib/tagutils.h @@ -31,6 +31,7 @@ #ifndef DO_NOT_DOCUMENT // tell Doxygen not to document this header #include "tbytevector.h" +#include "taglib.h" namespace TagLib { diff --git a/taglib/toolkit/taglib.h b/taglib/toolkit/taglib.h index 34bb394b..984cad3c 100644 --- a/taglib/toolkit/taglib.h +++ b/taglib/toolkit/taglib.h @@ -42,8 +42,6 @@ #include #endif -#include - //! A namespace for all TagLib related classes and functions /*! @@ -58,15 +56,6 @@ namespace TagLib { class String; - // These integer types are deprecated. Do not use them. - - using wchar = wchar_t; // Assumed to be sufficient to store a UTF-16 char. - using uchar = unsigned char; - using ushort = unsigned short; - using uint = unsigned int; - using ulong = unsigned long; - using ulonglong = unsigned long long; - // Offset or length type for I/O streams. // In Win32, always 64bit. Otherwise, equivalent to off_t. #ifdef _WIN32 @@ -75,11 +64,6 @@ namespace TagLib { using offset_t = off_t; #endif - /*! - * Unfortunately \c std::wstring isn't defined on some systems, (i.e. GCC < 3) - * so I'm providing something here that should be constant. - */ - using wstring = std::basic_string; } // namespace TagLib /*! diff --git a/taglib/toolkit/tbytevector.h b/taglib/toolkit/tbytevector.h index 668a24b3..abf88210 100644 --- a/taglib/toolkit/tbytevector.h +++ b/taglib/toolkit/tbytevector.h @@ -28,8 +28,8 @@ #include #include +#include -#include "taglib.h" #include "taglib_export.h" namespace TagLib { diff --git a/taglib/toolkit/tdebuglistener.cpp b/taglib/toolkit/tdebuglistener.cpp index 9a9bcd7c..745ede8e 100644 --- a/taglib/toolkit/tdebuglistener.cpp +++ b/taglib/toolkit/tdebuglistener.cpp @@ -42,7 +42,7 @@ namespace { #ifdef _WIN32 - const wstring wstr = msg.toWString(); + const std::wstring wstr = msg.toWString(); const int len = WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), -1, nullptr, 0, nullptr, nullptr); if(len != 0) { std::vector buf(len); diff --git a/taglib/toolkit/tiostream.h b/taglib/toolkit/tiostream.h index 29609b34..5429f86e 100644 --- a/taglib/toolkit/tiostream.h +++ b/taglib/toolkit/tiostream.h @@ -30,6 +30,10 @@ #include "taglib_export.h" #include "taglib.h" +#ifdef _WIN32 +#include +#endif + namespace TagLib { #ifdef _WIN32 diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp index 3158bd79..f19a6755 100644 --- a/taglib/toolkit/tstring.cpp +++ b/taglib/toolkit/tstring.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include "tdebug.h" @@ -139,7 +140,7 @@ namespace TagLib { /*! * Stores string in UTF-16. The byte order depends on the CPU endian. */ - TagLib::wstring data; + std::wstring data; /*! * This is only used to hold the most recent value of toCString(). @@ -170,19 +171,19 @@ String::String(const std::string &s, Type t) : } } -String::String(const wstring &s) : +String::String(const std::wstring &s) : String(s, wcharByteOrder()) { } -String::String(const wstring &s, Type t) : +String::String(const std::wstring &s, Type t) : d(std::make_shared()) { if(t == UTF16 || t == UTF16BE || t == UTF16LE) { copyFromUTF16(d->data, s.c_str(), s.length(), t); } else { - debug("String::String() -- TagLib::wstring should not contain Latin1 or UTF-8."); + debug("String::String() -- std::wstring should not contain Latin1 or UTF-8."); } } @@ -263,7 +264,7 @@ std::string String::to8Bit(bool unicode) const return std::string(v.data(), v.size()); } -TagLib::wstring String::toWString() const +std::wstring String::toWString() const { return d->data; } @@ -618,7 +619,7 @@ String &String::operator=(const std::string &s) return *this; } -String &String::operator=(const wstring &s) +String &String::operator=(const std::wstring &s) { String(s).swap(*this); return *this; diff --git a/taglib/toolkit/tstring.h b/taglib/toolkit/tstring.h index 48f3d1bb..f7e40815 100644 --- a/taglib/toolkit/tstring.h +++ b/taglib/toolkit/tstring.h @@ -30,7 +30,6 @@ #include "tbytevector.h" #include "taglib_export.h" -#include "taglib.h" /*! * \relates TagLib::String @@ -67,7 +66,7 @@ namespace TagLib { /*! * This is an implicitly shared \e wide string. For storage it uses - * TagLib::wstring, but as this is an implementation detail this of + * std::wstring, but as this is an implementation detail this of * course could change. Strings are stored internally as UTF-16 (without * BOM/CPU byte order) * @@ -85,8 +84,8 @@ namespace TagLib { public: #ifndef DO_NOT_DOCUMENT - using Iterator = TagLib::wstring::iterator; - using ConstIterator = TagLib::wstring::const_iterator; + using Iterator = std::wstring::iterator; + using ConstIterator = std::wstring::const_iterator; #endif /** @@ -141,12 +140,12 @@ namespace TagLib { /*! * Makes a deep copy of the data in \a s, which are in CPU byte order. */ - String(const wstring &s); + String(const std::wstring &s); /*! * Makes a deep copy of the data in \a s, which are in byte order \a t. */ - String(const wstring &s, Type t); + String(const std::wstring &s, Type t); /*! * Makes a deep copy of the data in \a s, which are in CPU byte order. @@ -204,7 +203,7 @@ namespace TagLib { * * \see toCWString() */ - wstring toWString() const; + std::wstring toWString() const; /*! * Creates and returns a standard C-style (null-terminated) version of this @@ -470,7 +469,7 @@ namespace TagLib { /*! * Performs a deep copy of the data in \a s. */ - String &operator=(const wstring &s); + String &operator=(const std::wstring &s); /*! * Performs a deep copy of the data in \a s. diff --git a/taglib/toolkit/tstringlist.h b/taglib/toolkit/tstringlist.h index 2c599797..a12cf3ab 100644 --- a/taglib/toolkit/tstringlist.h +++ b/taglib/toolkit/tstringlist.h @@ -26,8 +26,6 @@ #ifndef TAGLIB_STRINGLIST_H #define TAGLIB_STRINGLIST_H -#include - #include "tstring.h" #include "tlist.h" #include "tbytevectorlist.h" diff --git a/taglib/toolkit/tvariant.h b/taglib/toolkit/tvariant.h index 2d6c843c..a8408e54 100644 --- a/taglib/toolkit/tvariant.h +++ b/taglib/toolkit/tvariant.h @@ -26,6 +26,8 @@ #ifndef TAGLIB_VARIANT_H #define TAGLIB_VARIANT_H +#include + #include "tlist.h" #include "tmap.h" #include "taglib_export.h"