changeset 3022:bc94a0cca4f5

Place suggested parentheses around operand arithmetic.
author Tony Vroon <chainsaw@gentoo.org>
date Thu, 09 Apr 2009 23:05:29 +0100
parents 5fe8ac99a33d
children c56c51086ff2
files src/adplug/core/rol.cxx
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/adplug/core/rol.cxx	Thu Apr 09 22:57:02 2009 +0100
+++ b/src/adplug/core/rol.cxx	Thu Apr 09 23:05:29 2009 +0100
@@ -426,7 +426,7 @@
         opl->write( 0xc0+voice    , modulator.fbc      );
         opl->write( 0xe0+op_offset, modulator.waveform );
 
-        volumeCache[voice] = (carrier.ksltl & 0xc0) | volumeCache[voice] & 0x3f;
+        volumeCache[voice] = (carrier.ksltl & 0xc0) | (volumeCache[voice] & 0x3f);
 
         opl->write( 0x23+op_offset, carrier.ammulti  );
         opl->write( 0x43+op_offset, volumeCache[voice]    );
@@ -439,7 +439,7 @@
     {
         int const op_offset = drum_table[voice-kSnareDrumChannel];
 
-        volumeCache[voice] = (modulator.ksltl & 0xc0) | volumeCache[voice] & 0x3f;
+        volumeCache[voice] = (modulator.ksltl & 0xc0) | (volumeCache[voice] & 0x3f);
 
         opl->write( 0x20+op_offset, modulator.ammulti  );
         opl->write( 0x40+op_offset, volumeCache[voice]      );