cppcheck cleanup.
authorGwyn Ciesla <gwync@protonmail.com>
Mon, 8 Apr 2019 01:38:51 +0000 (20:38 -0500)
committerGwyn Ciesla <gwync@protonmail.com>
Mon, 8 Apr 2019 01:38:51 +0000 (20:38 -0500)
main.cpp
mishaps.cpp
powerup.cpp

index 0c3e9fd..b87a68f 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -488,9 +488,9 @@ int main(int argc, char *argv[]){
   int podcount = 0;
   int podsin = 0;
   int landercount = 0;
-  int crazycount = 0;
-  int crawlercount = 0;
-  int bosscount = 0;
+  int crazycount;
+  int crawlercount;
+  int bosscount;
   int alertleft = 0;
   int alertright = 0;
   int smartbombs = 2;
index 26507fa..21a6481 100644 (file)
@@ -27,7 +27,7 @@ int boom_object(int drawlocation, game_object boomstuff, game_object object, Mix
   int deathcycle=1;
   int loop=1;
   boomstuff.active=1;
-  channel = play_sound_effect(sound, channel);
+  play_sound_effect(sound, channel);
   while(deathcycle<=7){
     for(int boomx=object.x-10;boomx<=object.x+10;boomx++){
       for(int boomy=object.y-10;boomy<=object.y+10;boomy++){
index a7e41f2..6e2d69c 100644 (file)
@@ -49,7 +49,7 @@ void determine_powerup(game_object powerups[], game_object& object, int odds, Mi
   if(rand()%1000>odds){
     for(int puploop = 0; puploop<4; puploop++){
       if(powerups[puploop].active==0){
-        channel = play_sound_effect(sound, channel);
+        play_sound_effect(sound, channel);
         powerups[puploop] = powerup_init(powerups[puploop], object);
        break;
       };