changeset 2866:a31410f560cf

Sprinkle some braces to liven up the if-statements. The compiler likes it better now.
author Tony Vroon <chainsaw@gentoo.org>
date Wed, 06 Aug 2008 22:56:25 +0100
parents 0ba28b84bdef
children 638c3d599f20
files src/adplug/core/fmc.cxx src/adplug/core/mid.cxx src/adplug/core/s3m.cxx
diffstat 3 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/adplug/core/fmc.cxx	Wed Aug 06 11:48:18 2008 +0100
+++ b/src/adplug/core/fmc.cxx	Wed Aug 06 22:56:25 2008 +0100
@@ -130,6 +130,7 @@
         if (tracks[t][k].command == 0x0E)   // 0x0E (14): Retrig
           tracks[t][k].param1 = 3;
         if (tracks[t][k].command == 0x1A)   // 0x1A (26): Volume Slide
+        {
           if (tracks[t][k].param1 > tracks[t][k].param2)
           {
             tracks[t][k].param1 -= tracks[t][k].param2;
@@ -140,6 +141,7 @@
             tracks[t][k].param2 -= tracks[t][k].param1;
             tracks[t][k].param1 = 0;
           }
+        }
       }
 
       t++;
--- a/src/adplug/core/mid.cxx	Wed Aug 06 11:48:18 2008 +0100
+++ b/src/adplug/core/mid.cxx	Wed Aug 06 22:56:25 2008 +0100
@@ -328,11 +328,13 @@
     break;
   case 0x84:
     if (s[1] == 0x00 && load_sierra_ins (filename, fp))
+    {
       if (s[2] == 0xf0)
         good = FILE_ADVSIERRA;
       else
         good = FILE_SIERRA;
     break;
+    }
   default:
     if (s[4] == 'A' && s[5] == 'D')
       good = FILE_OLDLUCAS;
@@ -900,10 +902,12 @@
   midiprintf ("\n");
   for (i = 0; i < 16; i++)
     if (track[i].on)
+    {
       if (track[i].pos < track[i].tend)
         midiprintf ("<%d>", track[i].iwait);
       else
         midiprintf ("stop");
+    }
 
   /*
      if (ret==0 && type==FILE_ADVSIERRA)
--- a/src/adplug/core/s3m.cxx	Wed Aug 06 11:48:18 2008 +0100
+++ b/src/adplug/core/s3m.cxx	Wed Aug 06 22:56:25 2008 +0100
@@ -212,15 +212,19 @@
         tone_portamento (realchan, channel[realchan].dualinfo);
     case 4:
       if (info <= 0x0f)         // volume slide down
+      {
         if (channel[realchan].vol - info >= 0)
           channel[realchan].vol -= info;
         else
           channel[realchan].vol = 0;
+      }
       if ((info & 0x0f) == 0)   // volume slide up
+      {
         if (channel[realchan].vol + (info >> 4) <= 63)
           channel[realchan].vol += info >> 4;
         else
           channel[realchan].vol = 63;
+      }
       setvolume (realchan);
       break;
     case 5:
@@ -323,6 +327,7 @@
       // set channel values
       donote = 0;
       if (pattern[pattnr][row][chan].note < 14)
+      {
         // tone portamento
         if (pattern[pattnr][row][chan].command == 7
             || pattern[pattnr][row][chan].command == 12)
@@ -339,6 +344,7 @@
           channel[realchan].key = 1;
           donote = 1;
         }
+      }
       if (pattern[pattnr][row][chan].note == 14)
       {                         // key off (is 14 here, cause note is only first 4 bits)
         channel[realchan].key = 0;
@@ -371,10 +377,12 @@
           donote = 1;
       }
       if (pattern[pattnr][row][chan].volume != 255)
+      {
         if (pattern[pattnr][row][chan].volume < 64) // set volume
           channel[realchan].vol = pattern[pattnr][row][chan].volume;
         else
           channel[realchan].vol = 63;
+      }
       channel[realchan].fx = pattern[pattnr][row][chan].command;    // set command
       if (pattern[pattnr][row][chan].info)  // set infobyte
         channel[realchan].info = pattern[pattnr][row][chan].info;
@@ -420,15 +428,19 @@
         break;                  // pattern break
       case 4:
         if (info > 0xf0)        // fine volume down
+        {
           if (channel[realchan].vol - (info & 0x0f) >= 0)
             channel[realchan].vol -= info & 0x0f;
           else
             channel[realchan].vol = 0;
+        }
         if ((info & 0x0f) == 0x0f && info >= 0x1f)  // fine volume up
+        {
           if (channel[realchan].vol + ((info & 0xf0) >> 4) <= 63)
             channel[realchan].vol += (info & 0xf0) >> 4;
           else
             channel[realchan].vol = 63;
+        }
         setvolume (realchan);
         break;
       case 5:
@@ -468,6 +480,7 @@
         if (info == 0xb0)       // set loop start
           loopstart = row;
         if (info > 0xb0 && info <= 0xbf)    // pattern loop
+        {
           if (!loopcnt)
           {
             loopcnt = info & 0x0f;
@@ -479,6 +492,7 @@
             crow = loopstart;
             pattbreak = 1;
           }
+        }
         if ((info & 0xf0) == 0xe0)  // patterndelay
           del = speed * (info & 0x0f) - 1;
         break;