From 793faed447a260c3568d47b302233eaaa3aeec64 Mon Sep 17 00:00:00 2001 From: cam900 Date: Sat, 10 Dec 2022 14:26:26 +0900 Subject: [PATCH] constant-ize --- src/engine/platform/k007232.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/platform/k007232.cpp b/src/engine/platform/k007232.cpp index f18577ee..6f367a50 100644 --- a/src/engine/platform/k007232.cpp +++ b/src/engine/platform/k007232.cpp @@ -103,7 +103,7 @@ void DivPlatformK007232::tick(bool sysTick) { for (int i=0; i<2; i++) { chan[i].std.next(); if (chan[i].std.vol.had) { - signed char macroVol=((chan[i].vol&0xf)*MIN(chan[i].macroVolMul,chan[i].std.vol.val))/chan[i].macroVolMul; + const signed char macroVol=((chan[i].vol&0xf)*MIN(chan[i].macroVolMul,chan[i].std.vol.val))/chan[i].macroVolMul; if ((!isMuted[i]) && (macroVol!=chan[i].outVol)) { chan[i].outVol=macroVol; chan[i].volumeChanged=true; @@ -337,7 +337,7 @@ int DivPlatformK007232::dispatch(DivCommand c) { chan[c.chan].freqChanged=true; break; case DIV_CMD_NOTE_PORTA: { - int destFreq=NOTE_PERIODIC(c.value2); + const int destFreq=NOTE_PERIODIC(c.value2); bool return2=false; if (destFreq>chan[c.chan].baseFreq) { chan[c.chan].baseFreq+=c.value; @@ -514,7 +514,7 @@ void DivPlatformK007232::renderSamples(int sysID) { continue; } - int length=s->getLoopEndPosition(DIV_SAMPLE_DEPTH_8BIT); + const int length=s->getLoopEndPosition(DIV_SAMPLE_DEPTH_8BIT); int actualLength=MIN((int)(getSampleMemCapacity()-memPos)-1,length); if (actualLength>0) { if (actualLength>131072-1) {