From 1464ec2ab083e96a9bf5c17653090efde44d50a2 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 23 May 2021 19:33:27 +0200 Subject: [PATCH] Use text2b instead of container2b for u16string Should be equivalent. The only reason why we use container2b in some places is because strings based on `Steinberg::char16` arrays will have an incorrect length on the Wine side, because character traits for `wchar_t` is still reflects Linux instead of Windows there. --- src/common/serialization/vst3/event-list.h | 6 +++--- src/common/serialization/vst3/plugin/edit-controller.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/serialization/vst3/event-list.h b/src/common/serialization/vst3/event-list.h index 7f4247b3..fe9a95e9 100644 --- a/src/common/serialization/vst3/event-list.h +++ b/src/common/serialization/vst3/event-list.h @@ -85,7 +85,7 @@ struct YaNoteExpressionTextEvent { void serialize(S& s) { s.value4b(type_id); s.value4b(note_id); - s.container2b(text, std::extent_v); + s.text2b(text, std::extent_v); } }; @@ -120,7 +120,7 @@ struct YaChordEvent { s.value2b(root); s.value2b(bass_note); s.value2b(mask); - s.container2b(text, std::extent_v); + s.text2b(text, std::extent_v); } }; @@ -153,7 +153,7 @@ struct YaScaleEvent { void serialize(S& s) { s.value2b(root); s.value2b(mask); - s.container2b(text, std::extent_v); + s.text2b(text, std::extent_v); } }; diff --git a/src/common/serialization/vst3/plugin/edit-controller.h b/src/common/serialization/vst3/plugin/edit-controller.h index 616a844b..51c03b68 100644 --- a/src/common/serialization/vst3/plugin/edit-controller.h +++ b/src/common/serialization/vst3/plugin/edit-controller.h @@ -162,7 +162,7 @@ class YaEditController : public Steinberg::Vst::IEditController { template void serialize(S& s) { s.object(result); - s.container2b(string, std::extent_v); + s.text2b(string, std::extent_v); } }; @@ -225,7 +225,7 @@ class YaEditController : public Steinberg::Vst::IEditController { void serialize(S& s) { s.value8b(instance_id); s.value4b(id); - s.container2b(string, std::extent_v); + s.text2b(string, std::extent_v); } };