mirror of
https://github.com/taglib/taglib.git
synced 2025-06-03 00:58:12 -04:00
Revert "Stop exporting std::string and std::wstring in a public header."
This reverts commit 0e981adcc6daee17eaea6beda92bc2ce320363e8.
This commit is contained in:
parent
0e981adcc6
commit
1ff30e55da
@ -56,10 +56,10 @@ namespace
|
||||
{
|
||||
const DWORD access = readOnly ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE);
|
||||
|
||||
if(path.wstr()[0] != L'\0')
|
||||
return CreateFileW(path.wstr(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
else if(path.str()[0] != '\0')
|
||||
return CreateFileA(path.str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
if(!path.wstr().empty())
|
||||
return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
else if(!path.str().empty())
|
||||
return CreateFileA(path.str().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
else
|
||||
return InvalidFileHandle;
|
||||
}
|
||||
|
@ -129,14 +129,14 @@ FileName &FileName::operator=(const FileName &name)
|
||||
return *this;
|
||||
}
|
||||
|
||||
const wchar_t *FileName::wstr() const
|
||||
const std::wstring &FileName::wstr() const
|
||||
{
|
||||
return d->data->wname.c_str();
|
||||
return d->data->wname;
|
||||
}
|
||||
|
||||
const char *FileName::str() const
|
||||
const std::string &FileName::str() const
|
||||
{
|
||||
return d->data->name.c_str();
|
||||
return d->data->name;
|
||||
}
|
||||
|
||||
String FileName::toString() const
|
||||
|
@ -46,8 +46,8 @@ namespace TagLib {
|
||||
|
||||
FileName &operator=(const FileName &name);
|
||||
|
||||
const wchar_t *wstr() const;
|
||||
const char *str() const;
|
||||
const std::wstring &wstr() const;
|
||||
const std::string &str() const;
|
||||
|
||||
String toString() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user