- fixed warnings pointed out by Frank
authorRyan Flegel <rflegel@gmail.com>
Tue, 21 Sep 2004 22:03:32 +0000 (22:03 +0000)
committerRyan Flegel <rflegel@gmail.com>
Tue, 21 Sep 2004 22:03:32 +0000 (22:03 +0000)
SVN-Revision: 1957

src/level.cpp
src/sector.cpp

index 570b4b4..aad2bf9 100644 (file)
@@ -172,8 +172,8 @@ Level::get_total_coins()
 {
   int total_coins = 0;
   for(Sectors::iterator it = sectors.begin(); it != sectors.end(); ++it)
-    for(int x = 0; x < it->second->solids->get_width(); x++)
-      for(int y = 0; y < it->second->solids->get_height(); y++)
+    for(int x = 0; static_cast<unsigned int>(x) < it->second->solids->get_width(); x++)
+      for(int y = 0; static_cast<unsigned int>(y) < it->second->solids->get_height(); y++)
         if(it->second->solids->get_tile(x,y)->attributes & Tile::COIN)
           total_coins++;
   return total_coins;
index 5216775..017eff7 100644 (file)
@@ -45,8 +45,9 @@
 Sector* Sector::_current = 0;
 
 Sector::Sector()
-  : gravity(10), player(0), solids(0), background(0), camera(0),
-    end_sequence_animation_type(NONE_ENDSEQ_ANIM), currentmusic(LEVEL_MUSIC)
+  : end_sequence_animation_type(NONE_ENDSEQ_ANIM),
+    gravity(10), player(0), solids(0), background(0), camera(0),
+    currentmusic(LEVEL_MUSIC)
 {
   song_title = "Mortimers_chipdisko.mod";
   player = new Player();