From: <sv...@op...> - 2024-12-28 18:59:37
|
Author: manx Date: Sat Dec 28 19:59:25 2024 New Revision: 22632 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22632 Log: [Ref] Wine Integration: Do not rely on nlohmann::json implicit conversions. Modified: trunk/OpenMPT/mptrack/wine/NativeSoundDeviceMarshalling.h Modified: trunk/OpenMPT/mptrack/wine/NativeSoundDeviceMarshalling.h ============================================================================== --- trunk/OpenMPT/mptrack/wine/NativeSoundDeviceMarshalling.h Sat Dec 28 16:52:26 2024 (r22631) +++ trunk/OpenMPT/mptrack/wine/NativeSoundDeviceMarshalling.h Sat Dec 28 19:59:25 2024 (r22632) @@ -35,7 +35,7 @@ } inline void from_json(const nlohmann::json &j, SampleFormat &val) { - val = SampleFormat::FromInt(j); + val = SampleFormat::FromInt(j.get<int>()); } namespace SoundDevice @@ -47,7 +47,7 @@ } inline void from_json(const nlohmann::json &j, SoundDevice::ChannelMapping &val) { - val = SoundDevice::ChannelMapping::FromString(j); + val = SoundDevice::ChannelMapping::FromString(j.get<mpt::ustring>()); } inline void to_json(nlohmann::json &j, const SoundDevice::Info::Default &val) |