Allow implicit conversions from const char * or const wchar_t * to FileName in Win32.

This commit is contained in:
Tsuda Kageyu 2016-12-13 13:32:38 +09:00
parent ef1ae1a8fe
commit eea1a1b200
2 changed files with 4 additions and 4 deletions

View File

@ -56,10 +56,10 @@ public:
FileNamePrivate() :
data(new std::wstring()) {}
explicit FileNamePrivate(const wchar_t *name) :
FileNamePrivate(const wchar_t *name) :
data(new std::wstring(name)) {}
explicit FileNamePrivate(const char *name) :
FileNamePrivate(const char *name) :
data(new std::wstring(ansiToUnicode(name))) {}
SHARED_PTR<std::wstring> data;

View File

@ -37,8 +37,8 @@ namespace TagLib {
class TAGLIB_EXPORT FileName
{
public:
explicit FileName(const wchar_t *name);
explicit FileName(const char *name);
FileName(const wchar_t *name);
FileName(const char *name);
FileName(const FileName &name);
~FileName();