forked from HowardHinnant/date
Fixed WINRT build - we need convert_utf8_to_utf16 in WINRT mode too
This commit is contained in:
committed by
Howard Hinnant
parent
3e43210885
commit
bbe2f51bc0
29
src/tz.cpp
29
src/tz.cpp
@@ -204,20 +204,6 @@ static CONSTDATA char folder_delimiter = '/';
|
|||||||
#if !USE_OS_TZDB
|
#if !USE_OS_TZDB
|
||||||
|
|
||||||
# ifdef _WIN32
|
# ifdef _WIN32
|
||||||
# ifndef WINRT
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
struct task_mem_deleter
|
|
||||||
{
|
|
||||||
void operator()(wchar_t buf[])
|
|
||||||
{
|
|
||||||
if (buf != nullptr)
|
|
||||||
CoTaskMemFree(buf);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
using co_task_mem_ptr = std::unique_ptr<wchar_t[], task_mem_deleter>;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
static
|
||||||
std::wstring
|
std::wstring
|
||||||
@@ -248,6 +234,21 @@ convert_utf8_to_utf16(const std::string& s)
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ifndef WINRT
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
struct task_mem_deleter
|
||||||
|
{
|
||||||
|
void operator()(wchar_t buf[])
|
||||||
|
{
|
||||||
|
if (buf != nullptr)
|
||||||
|
CoTaskMemFree(buf);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
using co_task_mem_ptr = std::unique_ptr<wchar_t[], task_mem_deleter>;
|
||||||
|
}
|
||||||
|
|
||||||
// We might need to know certain locations even if not using the remote API,
|
// We might need to know certain locations even if not using the remote API,
|
||||||
// so keep these routines out of that block for now.
|
// so keep these routines out of that block for now.
|
||||||
static
|
static
|
||||||
|
Reference in New Issue
Block a user