Commit 50f07380 authored by Bastien Penavayre's avatar Bastien Penavayre Committed by Hugo Beauzée-Luyssen

Remove retelling of ToPlatformString() in logSet()

Replace use of code snippet doing the same thing as an already defined utility function with that said function.
Signed-off-by: 's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 79a67c49
......@@ -127,13 +127,7 @@ namespace libVLCX
{
m_instance.logSet([logCb](int logLevel, const libvlc_log_t* Log, std::string msgStr)
{
size_t len = MultiByteToWideChar(CP_UTF8, 0, msgStr.c_str(), -1, nullptr, 0);
if (len == 0)
return;
wchar_t *out = new wchar_t[len];
std::unique_ptr<wchar_t[]> out_u(out);
MultiByteToWideChar(CP_UTF8, 0, msgStr.c_str(), -1, out, len);
logCb(logLevel, ref new Platform::String(out));
logCb(logLevel, ToPlatformString(msgStr));
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment