diff --git a/src/tz.cpp b/src/tz.cpp index 8e639b8..345afa8 100644 --- a/src/tz.cpp +++ b/src/tz.cpp @@ -204,20 +204,6 @@ static CONSTDATA char folder_delimiter = '/'; #if !USE_OS_TZDB # 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; -} static std::wstring @@ -248,6 +234,21 @@ convert_utf8_to_utf16(const std::string& s) 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; +} + // We might need to know certain locations even if not using the remote API, // so keep these routines out of that block for now. static