From eccd9bcea6177afc793a4d1eb377c68ec821aa04 Mon Sep 17 00:00:00 2001 From: andheh <36114788+andheh@users.noreply.github.com> Date: Thu, 22 Mar 2018 10:01:15 +0100 Subject: [PATCH] made my changes to VSTEffect.cpp C++11 compliant --- src/effects/VST/VSTEffect.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/effects/VST/VSTEffect.cpp b/src/effects/VST/VSTEffect.cpp index b71fddba9..a61f468bc 100644 --- a/src/effects/VST/VSTEffect.cpp +++ b/src/effects/VST/VSTEffect.cpp @@ -102,7 +102,7 @@ static float reinterpretAsFloat(uint32_t x) { - static_assert(sizeof(float) == sizeof(uint32_t)); + static_assert(sizeof(float) == sizeof(uint32_t), "Cannot reinterpret uint32_t to float since sizes are different."); float f; std::memcpy(&f, &x, sizeof(float)); return f; @@ -110,7 +110,8 @@ static float reinterpretAsFloat(uint32_t x) static uint32_t reinterpretAsUint32(float f) { - static_assert(sizeof(float) == sizeof(uint32_t)); + static_assert(sizeof(float) == sizeof(uint32_t), "Cannot reinterpret float to uint32_t since sizes are different."); + uint32_t x; std::memcpy(&x, &f, sizeof(uint32_t)); return x;