From eb82b17bd57a1b872f1262165f61c14c51b7cc5c Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 8 Jun 2008 18:00:14 +0100 Subject: [PATCH] Get rid of compiler warnings --- src/LandingPad.cpp | 2 +- src/Mine.cpp | 2 ++ src/Surface.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/LandingPad.cpp b/src/LandingPad.cpp index ad28c1c..a557c50 100644 --- a/src/LandingPad.cpp +++ b/src/LandingPad.cpp @@ -23,7 +23,7 @@ Texture *LandingPad::landTexture = NULL; Texture *LandingPad::noLandTexture = NULL; LandingPad::LandingPad(Viewport *v, int index, int length) - : viewport(v), index(index), length(length) + : index(index), length(length), viewport(v) { LOAD_ONCE { landTexture = new Texture("images/landingpad.png"); diff --git a/src/Mine.cpp b/src/Mine.cpp index 1400b67..bddd13e 100644 --- a/src/Mine.cpp +++ b/src/Mine.cpp @@ -100,6 +100,7 @@ void Mine::Move() nexty = ypos; nextx = xpos + 1; break; + case dirNone: default: nextx = xpos; nexty = ypos; @@ -126,6 +127,7 @@ void Mine::Move() case dirDown: displace_y++; break; case dirLeft: displace_x--; break; case dirRight: displace_x++; break; + default: break; } movedelay = MINE_MOVE_SPEED; } diff --git a/src/Surface.cpp b/src/Surface.cpp index 2881ddb..c9d934b 100644 --- a/src/Surface.cpp +++ b/src/Surface.cpp @@ -25,7 +25,7 @@ const int Surface::SURFACE_SIZE = 20; Texture *Surface::surfTexture[Surface::NUM_SURF_TEX]; Surface::Surface(Viewport *v) - : surface(NULL), viewport(v) + : viewport(v), surface(NULL) { LOAD_ONCE { surfTexture[0] = new Texture("images/grass_surface.png"); -- 2.39.2