zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit f129cb357f72e3884421821d580e82d67c3872f6
parent 4bb02a7fcbaa510c77b8459b543483c7d56c0c5b
Author: Hans Petter Selasky <hps@selasky.org>
Date:   Sun, 30 May 2021 18:27:50 +0200

Optimise floating point test.

0.0f is equal to -0.0f.

Signed-off-by: Hans Petter Selasky <hps@selasky.org>

Diffstat:
Msrc/Nio/Compressor.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Nio/Compressor.h b/src/Nio/Compressor.h @@ -14,8 +14,8 @@ #define _COMPRESSOR_H_ #define floatIsValid(x) ({ \ - float __r = (x) * 0.0; \ - __r == 0.0 || __r == -0.0; \ + const float __r = (x) * 0.0; \ + __r == 0.0; \ }) #define stereoCompressor(div,pv,l,r) do { \