mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12: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) {
|
||||
#ifdef __WINE__
|
||||
// Who even invented UTF-16
|
||||
static_assert(sizeof(wchar_t) == sizeof(char16_t));
|
||||
#endif
|
||||
static_assert(sizeof(Steinberg::Vst::TChar) == sizeof(char16_t));
|
||||
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