From cb0a8396c4151bbebca7669af2b4cf5a9008e651 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 24 Aug 2023 04:31:32 -0500 Subject: [PATCH] improve --- src/gui/insEdit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index b470e7632..562c8222c 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -1767,12 +1767,12 @@ void FurnaceGUI::drawMacroEdit(FurnaceGUIMacroDesc& i, int totalFit, float avail \ /* if ADSR/LFO, populate min/max */ \ if (i.macro->open&6) { \ - if ((i.macro->val[0]==0) && (i.macro->val[1]==0)) { \ + if (i.macro->val[0]==0 && i.macro->val[1]==0) { \ i.macro->val[0]=i.min; \ i.macro->val[1]=i.max; \ } \ - i.macro->val[0]=(i.macro->val[0]val[0]>i.max ? i.max : i.macro->val[0])); \ - i.macro->val[1]=(i.macro->val[1]val[1]>i.max ? i.max : i.macro->val[1])); \ + i.macro->val[0]=CLAMP(i.macro->val[0],i.min,i.max); \ + i.macro->val[1]=CLAMP(i.macro->val[1],i.min,i.max); \ } \ } \ PARAMETER; \