mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Make the UTF-16 conversion a bit safer
This commit is contained in:
@@ -26,9 +26,11 @@ YaHostApplication::ConstructArgs::ConstructArgs(
|
|||||||
if (context->getName(name_array) == Steinberg::kResultOk) {
|
if (context->getName(name_array) == Steinberg::kResultOk) {
|
||||||
#ifdef __WINE__
|
#ifdef __WINE__
|
||||||
// Who even invented UTF-16
|
// Who even invented UTF-16
|
||||||
static_assert(sizeof(wchar_t) == sizeof(char16_t));
|
static_assert(sizeof(Steinberg::Vst::TChar) == sizeof(char16_t));
|
||||||
#endif
|
|
||||||
name = std::u16string(reinterpret_cast<const char16_t*>(name_array));
|
name = std::u16string(reinterpret_cast<const char16_t*>(name_array));
|
||||||
|
#else
|
||||||
|
name = std::u16string(static_cast<const char16_t*>(name_array));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user