More -Weffc++ cleanup
authorIngo Ruhnke <grumbel@gmx.de>
Tue, 17 Nov 2009 17:04:31 +0000 (17:04 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Tue, 17 Nov 2009 17:04:31 +0000 (17:04 +0000)
SVN-Revision: 6012

49 files changed:
src/control/joystickkeyboardcontroller.cpp
src/control/joystickkeyboardcontroller.hpp
src/gui/button.cpp
src/gui/button.hpp
src/gui/menu.cpp
src/math/random_generator.cpp
src/object/ambient_sound.hpp
src/object/bicycle_platform.cpp
src/object/bicycle_platform.hpp
src/object/block.cpp
src/object/block.hpp
src/object/bouncy_coin.cpp
src/object/broken_brick.cpp
src/object/bullet.cpp
src/object/endsequence.cpp
src/object/endsequence.hpp
src/object/endsequence_walkleft.cpp
src/object/endsequence_walkleft.hpp
src/object/endsequence_walkright.cpp
src/object/endsequence_walkright.hpp
src/object/falling_coin.cpp
src/object/gradient.cpp
src/object/gradient.hpp
src/object/growup.cpp
src/object/icecrusher.cpp
src/object/infoblock.cpp
src/object/infoblock.hpp
src/object/invisible_wall.cpp
src/object/ispy.cpp
src/object/light.cpp
src/object/magicblock.cpp
src/object/pneumatic_platform.hpp
src/object/powerup.cpp
src/object/pushbutton.cpp
src/object/rainsplash.cpp
src/object/rainsplash.hpp
src/object/rock.cpp
src/object/scripted_object.cpp
src/object/specialriser.cpp
src/object/specialriser.hpp
src/object/sprite_particle.cpp
src/object/star.cpp
src/object/text_object.hpp
src/object/trampoline.cpp
src/object/unstable_tile.cpp
src/physfs/physfs_stream.cpp
src/scripting/camera.hpp
src/scripting/level_time.hpp
src/scripting/thunderstorm.hpp

index 4e14336..6127e2d 100644 (file)
@@ -41,8 +41,13 @@ public:
   void update_menu_item(Control id);
   virtual void menu_action(MenuItem* item);
   JoystickKeyboardController* controller;
+
 private:
   void recreateMenu();
+
+private:
+  JoystickMenu(const JoystickMenu&);
+  JoystickMenu& operator=(const JoystickMenu&);
 };
 
 class JoystickKeyboardController::KeyboardMenu : public Menu
@@ -55,10 +60,27 @@ public:
   std::string get_key_name(SDLKey key);
   virtual void menu_action(MenuItem* item);
   JoystickKeyboardController* controller;
+
+private:
+  KeyboardMenu(const KeyboardMenu&);
+  KeyboardMenu& operator=(const KeyboardMenu&);
 };
 
 JoystickKeyboardController::JoystickKeyboardController() :
+  keymap(),
+  joy_button_map(),
+  joy_axis_map(),
+  joy_hat_map(),
+  joysticks(),
+  name(),
+  dead_zone(),
+  min_joybuttons(),
+  max_joybuttons(),
+  max_joyaxis(),
+  max_joyhats(),
   hat_state(0),
+  jump_with_up_joy(),
+  jump_with_up_kbd(),
   wait_for_key(-1), 
   wait_for_joystick(-1),
   key_options_menu(0), 
index 49da0a2..5af4263 100644 (file)
@@ -58,16 +58,39 @@ private:
 
   void print_joystick_mappings();
 
+  SDLKey reversemap_key(Control c);
+  int    reversemap_joybutton(Control c);
+  int    reversemap_joyaxis(Control c);
+  int    reversemap_joyhat(Control c);
+
+  void unbind_joystick_control(Control c);
+
+  void bind_joybutton(int button, Control c);
+  void bind_joyaxis(int axis, Control c);
+  void bind_joyhat(int dir, Control c);
+  void bind_key(SDLKey key, Control c);
+
+  void set_joy_controls(Control id, bool value);
+
+private:
+  class KeyboardMenu;
+  class JoystickMenu;
+
+  friend class KeyboardMenu;
+  friend class JoystickMenu;
+
   typedef std::map<SDLKey, Control> KeyMap;
+  typedef std::map<int, Control> ButtonMap;
+  typedef std::map<int, Control> AxisMap;
+  typedef std::map<int, Control> HatMap;
+
+private:
   KeyMap keymap;
 
-  typedef std::map<int, Control> ButtonMap;
   ButtonMap joy_button_map;
 
-  typedef std::map<int, Control> AxisMap;
   AxisMap joy_axis_map;
 
-  typedef std::map<int, Control> HatMap;
   HatMap joy_hat_map;
 
   std::vector<SDL_Joystick*> joysticks;
@@ -89,30 +112,11 @@ private:
   bool jump_with_up_joy; // Joystick up jumps
   bool jump_with_up_kbd; // Keyboard up jumps
 
-  SDLKey reversemap_key(Control c);
-  int    reversemap_joybutton(Control c);
-  int    reversemap_joyaxis(Control c);
-  int    reversemap_joyhat(Control c);
-
-  void unbind_joystick_control(Control c);
-
-  void bind_joybutton(int button, Control c);
-  void bind_joyaxis(int axis, Control c);
-  void bind_joyhat(int dir, Control c);
-  void bind_key(SDLKey key, Control c);
-
-  void set_joy_controls(Control id, bool value);
-
   int wait_for_key;
   int wait_for_joystick;
 
-  class KeyboardMenu;
-  class JoystickMenu;
-
   KeyboardMenu* key_options_menu;
   JoystickMenu* joystick_options_menu;
-  friend class KeyboardMenu;
-  friend class JoystickMenu;
 
 private:
   JoystickKeyboardController(const JoystickKeyboardController&);
index a4f5fa0..937bf6c 100644 (file)
@@ -36,10 +36,37 @@ Button::Button(Surface* image_, std::string info_, SDLKey binding_) :
   info = info_;
 }
 
+Button::Button(const Button& rhs) :
+  pos(rhs.pos),
+  size(rhs.size),
+  image(rhs.image),
+  binding(rhs.binding),
+  id(rhs.id),
+  state(rhs.state),
+  info(rhs.info)
+{
+}
+
 Button::~Button()
 {
 }
 
+Button&
+Button::operator=(const Button& rhs)
+{
+  if (this != &rhs)
+  {
+    pos = rhs.pos;
+    size = rhs.size;
+    image = rhs.image;
+    binding = rhs.binding;
+    id = rhs.id;
+    state = rhs.state;
+    info = rhs.info;
+  }
+  return *this;
+}
+
 void Button::draw(DrawingContext &context, bool selected)
 {
   if(selected)
index 405b25b..0194dc8 100644 (file)
@@ -39,8 +39,11 @@ class Button
 {
 public:
   Button(Surface* image_, std::string info_, SDLKey binding_);
+  Button(const Button& rhs);
   ~Button();
 
+  Button& operator=(const Button& rhs);
+
   void draw(DrawingContext& context, bool selected);
   int event(SDL_Event& event, int x_offset = 0, int y_offset = 0);
 
@@ -49,6 +52,7 @@ public:
 private:
   friend class ButtonGroup;
 
+private:
   Vector pos;
   Vector size;
 
index dfafa44..158bb06 100644 (file)
@@ -171,7 +171,8 @@ MenuItem::MenuItem(MenuItemKind _kind, int _id) :
   help(),
   list(),
   selected(),
-  target_menu()
+  target_menu(),
+  input_flickering()
 {
   toggled = false;
   selected = false;
index 83d424b..f1f846b 100644 (file)
 
 RandomGenerator systemRandom;               // global random number generator
 
-RandomGenerator::RandomGenerator() {
+RandomGenerator::RandomGenerator() :
+  initialized(),
+  fptr(),
+  rptr(),
+  state(),
+  rand_type(),
+  rand_deg(),
+  rand_sep(),
+  end_ptr(),
+  debug()
+{
   assert(sizeof(int) >= 4);
   initialized = 0;
   debug = 0;                              // change this by hand for debug
index cd8eb74..fc7bd1f 100644 (file)
@@ -103,6 +103,10 @@ private:
   float currentvolume; /// how loud we are
 
   float * volume_ptr; /// this will be used by the volume adjustment effect.
+
+private:
+  AmbientSound(const AmbientSound&);
+  AmbientSound& operator=(const AmbientSound&);
 };
 
 #endif
index fd63365..c66ee3e 100644 (file)
@@ -27,9 +27,11 @@ BicyclePlatform::BicyclePlatform(const Reader& reader) :
   MovingSprite(reader, LAYER_OBJECTS, COLGROUP_STATIC), 
   master(0),
   slave(0), 
+  center(),
   radius(128), 
   angle(0), 
   angular_speed(0), 
+  contacts(),
   momentum(0)
 {
   center = get_pos();
@@ -43,6 +45,7 @@ BicyclePlatform::BicyclePlatform(BicyclePlatform* master) :
   radius(master->radius), 
   angle(master->angle + M_PI), 
   angular_speed(0), 
+  contacts(),
   momentum(0)
 {
   set_pos(get_pos() + Vector(master->get_bbox().get_width(), 0));
index 3236065..569b16a 100644 (file)
@@ -42,6 +42,9 @@ protected:
   std::set<GameObject*> contacts; /**< objects that are currently pushing on the platform */
   float momentum; /** angular momentum in rad per second per second*/
 
+private:
+  BicyclePlatform(const BicyclePlatform&);
+  BicyclePlatform& operator=(const BicyclePlatform&);
 };
 
 #endif
index f5ba2d8..dd57c25 100644 (file)
@@ -159,6 +159,7 @@ Block::start_break(GameObject* hitter)
 
 BonusBlock::BonusBlock(const Vector& pos, int data) :
   Block(sprite_manager->create("images/objects/bonus_block/bonusblock.sprite")), 
+  contents(),
   object(0)
 {
   bbox.set_pos(pos);
@@ -177,7 +178,9 @@ BonusBlock::BonusBlock(const Vector& pos, int data) :
 }
 
 BonusBlock::BonusBlock(const Reader& lisp) :
-  Block(sprite_manager->create("images/objects/bonus_block/bonusblock.sprite"))
+  Block(sprite_manager->create("images/objects/bonus_block/bonusblock.sprite")),
+  contents(),
+  object(0)
 {
   Vector pos;
 
index fd06c2c..d31ba4d 100644 (file)
@@ -74,12 +74,16 @@ public:
     CONTENT_CUSTOM
   };
 
-  Contents contents;
 protected:
   virtual void hit(Player& player);
 
-private:
+public:
+  Contents contents;
   MovingObject* object;
+
+private:
+  BonusBlock(const BonusBlock&);
+  BonusBlock& operator=(const BonusBlock&);
 };
 
 class Brick : public Block
index d737151..d89b568 100644 (file)
@@ -25,7 +25,9 @@ static const float FADE_TIME = .2f;
 static const float LIFE_TIME = .5f;
 
 BouncyCoin::BouncyCoin(const Vector& pos, bool emerge) :
+  sprite(),
   position(pos), 
+  timer(),
   emerge_distance(0)
 {
   timer.start(LIFE_TIME);
index da6cdf0..bdf3db2 100644 (file)
@@ -21,6 +21,7 @@
 
 BrokenBrick::BrokenBrick(std::auto_ptr<Sprite> sprite,
                          const Vector& pos, const Vector& nmovement) :
+  timer(),
   sprite(sprite), 
   position(pos), 
   movement(nmovement)
index 62baac0..2161e3b 100644 (file)
@@ -25,8 +25,11 @@ const float BULLET_XM = 600;
 const float BULLET_STARTING_YM = 0;
 }
 
-Bullet::Bullet(const Vector& pos, float xm, int dir, BonusType type)
-  : life_count(3), type(type)
+Bullet::Bullet(const Vector& pos, float xm, int dir, BonusType type) :
+  physic(),
+  life_count(3), 
+  sprite(),
+  type(type)
 {
   float speed = dir == RIGHT ? BULLET_XM : -BULLET_XM;
   physic.set_velocity_x(speed + xm);
index a993256..df0a690 100644 (file)
 #include "object/player.hpp"
 #include "supertux/sector.hpp"
 
-EndSequence::EndSequence()
-  : isrunning(false), isdone(false), tux_may_walk(true)
-{
-  end_sequence_controller = 0;
+EndSequence::EndSequence() :
+  isrunning(false), 
+  isdone(false), 
+  tux_may_walk(true),
+  end_sequence_controller(0)
+{  
 }
 
 EndSequence::~EndSequence()
index e05ae7e..f9f2ace 100644 (file)
@@ -40,6 +40,7 @@ protected:
   virtual void running(float elapsed_time); /**< called while the EndSequence is running */
   virtual void stopping(); /**< called when EndSequence stops */
 
+protected:
   bool isrunning; /**< true while EndSequence plays */
   bool isdone; /**< true if EndSequence has finished playing */
   bool tux_may_walk; /**< true while tux is allowed to walk */
index 0ee8e74..809b8ba 100644 (file)
 #include "supertux/mainloop.hpp"
 #include "supertux/sector.hpp"
 
-EndSequenceWalkLeft::EndSequenceWalkLeft()
-  : EndSequence()
+EndSequenceWalkLeft::EndSequenceWalkLeft() :
+  EndSequence(),
+  last_x_pos(),
+  endsequence_timer()
 {
 }
 
index 27a9ae7..fd5de66 100644 (file)
@@ -32,6 +32,7 @@ protected:
   virtual void running(float elapsed_time); /**< called while the EndSequence is running */
   virtual void stopping(); /**< called when EndSequence stops */
 
+private:
   float last_x_pos;
   Timer endsequence_timer;
 };
index 4dafb39..5812975 100644 (file)
 #include "supertux/mainloop.hpp"
 #include "supertux/sector.hpp"
 
-EndSequenceWalkRight::EndSequenceWalkRight()
-  : EndSequence()
+EndSequenceWalkRight::EndSequenceWalkRight() :
+  EndSequence(),
+  last_x_pos(),
+  endsequence_timer()
 {
 }
 
index 39da583..cc06785 100644 (file)
@@ -32,6 +32,7 @@ protected:
   virtual void running(float elapsed_time); /**< called while the EndSequence is running */
   virtual void stopping(); /**< called when EndSequence stops */
 
+private:
   float last_x_pos;
   Timer endsequence_timer;
 };
index c6545f9..73b9302 100644 (file)
 #include "sprite/sprite_manager.hpp"
 #include "supertux/main.hpp"
 
-FallingCoin::FallingCoin(const Vector& start_position, const int vel_x)
+FallingCoin::FallingCoin(const Vector& start_position, const int vel_x) :
+  physic(),
+  pos(),
+  sprite()
 {
   pos = start_position;
   sprite = sprite_manager->create("images/objects/coin/coin.sprite");
index 2a785f6..896f30b 100644 (file)
 #include "util/reader.hpp"
 
 Gradient::Gradient() :
-  layer(LAYER_BACKGROUND0)
+  layer(LAYER_BACKGROUND0),
+  gradient_top(),
+  gradient_bottom()
 {
 }
 
 Gradient::Gradient(const Reader& reader) :
-  layer(LAYER_BACKGROUND0)
+  layer(LAYER_BACKGROUND0),
+  gradient_top(),
+  gradient_bottom()
 {
   reader.get("layer", layer);
   std::vector<float> bkgd_top_color, bkgd_bottom_color;
index de26707..aab61be 100644 (file)
@@ -44,7 +44,8 @@ public:
 
 private:
   int layer;
-  Color gradient_top, gradient_bottom;
+  Color gradient_top;
+  Color gradient_bottom;
 };
 
 #endif /*SUPERTUX_BACKGROUND_H*/
index d460feb..4990cf0 100644 (file)
@@ -19,7 +19,8 @@
 #include "object/player.hpp"
 
 GrowUp::GrowUp(Direction direction) :
-  MovingSprite(Vector(0,0), "images/powerups/egg/egg.sprite", LAYER_OBJECTS, COLGROUP_MOVING)
+  MovingSprite(Vector(0,0), "images/powerups/egg/egg.sprite", LAYER_OBJECTS, COLGROUP_MOVING),
+  physic()
 {
   physic.enable_gravity(true);
   physic.set_velocity_x((direction == LEFT)?-100:100);
index d86f4dd..1d7663f 100644 (file)
@@ -27,9 +27,11 @@ const float DROP_SPEED = 500;
 const float RECOVER_SPEED = 200;
 }
 
-IceCrusher::IceCrusher(const Reader& reader)
-  : MovingSprite(reader, "images/creatures/icecrusher/icecrusher.sprite", LAYER_OBJECTS, COLGROUP_STATIC), 
-    state(IDLE), speed(Vector(0,0))
+IceCrusher::IceCrusher(const Reader& reader) :
+  MovingSprite(reader, "images/creatures/icecrusher/icecrusher.sprite", LAYER_OBJECTS, COLGROUP_STATIC), 
+  state(IDLE), 
+  start_position(),
+  speed(Vector(0,0))
 {
   start_position = get_bbox().p1;
   set_state(state, true);
index 9b9e5ae..13ad9a2 100644 (file)
@@ -32,8 +32,11 @@ const float HEIGHT = 200;
 
 InfoBlock::InfoBlock(const Reader& lisp) :
   Block(sprite_manager->create("images/objects/bonus_block/infoblock.sprite")), 
+  message(),
   shown_pct(0), 
-  dest_pct(0)
+  dest_pct(0),
+  lines(),
+  lines_height()
 {
   Vector pos;
   lisp.get("x", pos.x);
index 28157ae..91ae5ba 100644 (file)
@@ -33,14 +33,14 @@ public:
 
 protected:
   virtual void hit(Player& player);
+  Player* get_nearest_player();
+
+protected:
   std::string message;
   //AmbientSound* ringing;
   //bool stopped;
   float shown_pct; /**< Value in the range of 0..1, depending on how much of the infobox is currently shown */
   float dest_pct; /**< With each call to update(), shown_pct will slowly transition to this value */
-
-  Player* get_nearest_player();
-
   std::vector<InfoBoxLine*> lines; /**< lines of text (or images) to display */
   float lines_height;
 };
index d0edd64..beb41a9 100644 (file)
 #include "supertux/object_factory.hpp"
 #include "util/reader.hpp"
 
-InvisibleWall::InvisibleWall(const Reader& lisp)
-  : MovingSprite(lisp, "images/objects/invisible/invisible.sprite", LAYER_TILES, COLGROUP_STATIC), width(32), height(32)
+InvisibleWall::InvisibleWall(const Reader& lisp) :
+  MovingSprite(lisp, "images/objects/invisible/invisible.sprite", LAYER_TILES, COLGROUP_STATIC), 
+  physic(),
+  width(32), 
+  height(32)
 {
   lisp.get("width", width);
   lisp.get("height", height);
index 5a93350..3d0c169 100644 (file)
 #include "supertux/sector.hpp"
 #include "supertux/tile.hpp"
 
-Ispy::Ispy(const Reader& reader)
-  : MovingSprite(reader, "images/objects/ispy/ispy.sprite", LAYER_TILES+5, COLGROUP_DISABLED), state(ISPYSTATE_IDLE), dir(AUTO)
+Ispy::Ispy(const Reader& reader) :
+  MovingSprite(reader, "images/objects/ispy/ispy.sprite", LAYER_TILES+5, COLGROUP_DISABLED), 
+  state(ISPYSTATE_IDLE), 
+  script(),
+  dir(AUTO)
 {
   // read script to execute
   reader.get("script", script);
index 5d7765d..bd00cef 100644 (file)
 #include "sprite/sprite.hpp"
 #include "sprite/sprite_manager.hpp"
 
-Light::Light(const Vector& center, const Color& color) : position(center), color(color)
+Light::Light(const Vector& center, const Color& color) : 
+  position(center), 
+  color(color),
+  sprite()
 {
   sprite = sprite_manager->create("images/objects/lightmap_light/lightmap_light.sprite");
 }
index f98fca2..ab3d647 100644 (file)
@@ -35,9 +35,12 @@ const float MIN_SOLIDTIME = 1.0f;
 const float SWITCH_DELAY = 0.1f; /**< seconds to wait for stable conditions until switching solidity */
 }
 
-MagicBlock::MagicBlock(const Reader& lisp)
-  : MovingSprite(lisp, "images/objects/magicblock/magicblock.sprite"),
-    is_solid(false), solid_time(0), switch_delay(0), light(1.0f,1.0f,1.0f)
+MagicBlock::MagicBlock(const Reader& lisp) :
+  MovingSprite(lisp, "images/objects/magicblock/magicblock.sprite"),
+  is_solid(false), 
+  solid_time(0), 
+  switch_delay(0), 
+  light(1.0f,1.0f,1.0f)
 {
   set_group(COLGROUP_STATIC);
   //get color from lisp
index ca636e4..80b1449 100644 (file)
@@ -40,6 +40,9 @@ protected:
   float speed_y; /**< vertical speed */
   std::set<GameObject*> contacts; /**< objects that are currently pushing on the platform */
 
+private:
+  PneumaticPlatform(const PneumaticPlatform&);
+  PneumaticPlatform& operator=(const PneumaticPlatform&);
 };
 
 #endif
index 3eebf65..f4af4ab 100644 (file)
 #include "util/reader.hpp"
 
 PowerUp::PowerUp(const Reader& lisp) :
-  MovingSprite(lisp, LAYER_OBJECTS, COLGROUP_MOVING)
+  MovingSprite(lisp, LAYER_OBJECTS, COLGROUP_MOVING),
+  physic(),
+  script(),
+  no_physics()
 {
   lisp.get("script", script);
   no_physics = false;
index 5816607..5488de3 100644 (file)
@@ -26,8 +26,10 @@ const std::string BUTTON_SOUND = "sounds/switch.ogg";
 //14 -> 8
 }
 
-PushButton::PushButton(const Reader& lisp)
-  : MovingSprite(lisp, "images/objects/pushbutton/pushbutton.sprite", LAYER_BACKGROUNDTILES+1, COLGROUP_MOVING), state(OFF)
+PushButton::PushButton(const Reader& lisp) :
+  MovingSprite(lisp, "images/objects/pushbutton/pushbutton.sprite", LAYER_BACKGROUNDTILES+1, COLGROUP_MOVING), 
+  script(),
+  state(OFF)
 {
   sound_manager->preload(BUTTON_SOUND);
   set_action("off", -1);
index 3e09edd..3ad899a 100644 (file)
 
 #include "object/rainsplash.hpp"
 
-RainSplash::RainSplash(Vector pos, bool vertical)
+RainSplash::RainSplash(Vector pos, bool vertical) :
+  sprite(),
+  position(),
+  frame()
 {
   frame = 0;
   position = pos;
index 5baa1aa..ad4f85a 100644 (file)
@@ -32,6 +32,7 @@ protected:
   virtual void hit(Player& );
   virtual void update(float time);
   virtual void draw(DrawingContext& context);
+
 private:
   std::auto_ptr<Sprite> sprite;
   Vector position;
index 3820063..ee9b2f4 100644 (file)
@@ -38,6 +38,7 @@ Rock::Rock(const Vector& pos, std::string spritename) :
 
 Rock::Rock(const Reader& reader) :
   MovingSprite(reader, "images/objects/rock/rock.sprite"),
+  physic(),
   on_ground(),
   grabbed(),
   last_movement()
index 8f1ab36..b1a572a 100644 (file)
 #include "sprite/sprite.hpp"
 #include "supertux/object_factory.hpp"
 
-ScriptedObject::ScriptedObject(const Reader& lisp)
-  : MovingSprite(lisp, LAYER_OBJECTS, COLGROUP_MOVING_STATIC),
-    solid(true), physic_enabled(true), visible(true), new_vel_set(false)
+ScriptedObject::ScriptedObject(const Reader& lisp) :
+  MovingSprite(lisp, LAYER_OBJECTS, COLGROUP_MOVING_STATIC),
+  solid(true), 
+  physic_enabled(true), 
+  visible(true), 
+  new_vel_set(false)
 {
   lisp.get("name", name);
   if(name == "")
index 7c29665..013109a 100644 (file)
@@ -18,8 +18,9 @@
 #include "object/specialriser.hpp"
 #include "supertux/sector.hpp"
 
-SpecialRiser::SpecialRiser(Vector pos, MovingObject* _child)
-  : child(_child)
+SpecialRiser::SpecialRiser(Vector pos, MovingObject* _child) :
+  offset(),
+  child(_child)
 {
   _child->set_pos(pos - Vector(0, 32));
   offset = 0;
index 76d5443..9d42370 100644 (file)
@@ -35,6 +35,10 @@ public:
 private:
   float offset;
   MovingObject* child;
+
+private:
+  SpecialRiser(const SpecialRiser&);
+  SpecialRiser& operator=(const SpecialRiser&);
 };
 
 #endif
index d8dc535..07d8732 100644 (file)
@@ -23,6 +23,7 @@
 SpriteParticle::SpriteParticle(std::string sprite_name, std::string action, 
                                Vector position, AnchorPoint anchor, Vector velocity, Vector acceleration, 
                                int drawing_layer) :
+  sprite(),
   position(position), 
   velocity(velocity), 
   acceleration(acceleration), 
index 773be33..9e7932a 100644 (file)
@@ -21,8 +21,9 @@ static const float INITIALJUMP = -400;
 static const float SPEED = 150;
 static const float JUMPSPEED = -300;
 
-Star::Star(const Vector& pos, Direction direction)
-  : MovingSprite(pos, "images/powerups/star/star.sprite", LAYER_OBJECTS, COLGROUP_MOVING)
+Star::Star(const Vector& pos, Direction direction) :
+  MovingSprite(pos, "images/powerups/star/star.sprite", LAYER_OBJECTS, COLGROUP_MOVING),
+  physic()
 {
   physic.set_velocity((direction == LEFT) ? -SPEED : SPEED, INITIALJUMP);
 }
index 0e27c26..8ec495a 100644 (file)
@@ -88,6 +88,10 @@ private:
   bool centered;
   AnchorPoint anchor;
   Vector pos;
+
+private:
+  TextObject(const TextObject&);
+  TextObject& operator=(const TextObject&);
 };
 
 #endif
index bd6c2b8..3b6630c 100644 (file)
@@ -31,12 +31,12 @@ const float VY_MIN = -900; //negative, upwards
 const float VY_INITIAL = -500;
 }
 
-Trampoline::Trampoline(const Reader& lisp)
-  : Rock(lisp, "images/objects/trampoline/trampoline.sprite")
+Trampoline::Trampoline(const Reader& lisp) :
+  Rock(lisp, "images/objects/trampoline/trampoline.sprite"),
+  portable(true)
 {
   sound_manager->preload(TRAMPOLINE_SOUND);
 
-  portable = true;
   //Check if this trampoline is not portable
   if(lisp.get("portable", portable)) {
     if(!portable) {
index 0157162..de55c33 100644 (file)
 #include "supertux/constants.hpp"
 #include "supertux/object_factory.hpp"
 
-UnstableTile::UnstableTile(const Reader& lisp)
-  : MovingSprite(lisp, LAYER_TILES, COLGROUP_STATIC), state(STATE_NORMAL)
+UnstableTile::UnstableTile(const Reader& lisp) :
+  MovingSprite(lisp, LAYER_TILES, COLGROUP_STATIC), 
+  physic(),
+  state(STATE_NORMAL)
 {
   sprite->set_action("normal");
 }
index 659c8ce..48bc10c 100644 (file)
@@ -22,7 +22,8 @@
 #include <sstream>
 #include <stdexcept>
 
-IFileStreambuf::IFileStreambuf(const std::string& filename)
+IFileStreambuf::IFileStreambuf(const std::string& filename) :
+  file()
 {
   // check this as PHYSFS seems to be buggy and still returns a
   // valid pointer in this case
@@ -102,7 +103,8 @@ IFileStreambuf::seekoff(off_type off, std::ios_base::seekdir dir,
 
 //---------------------------------------------------------------------------
 
-OFileStreambuf::OFileStreambuf(const std::string& filename)
+OFileStreambuf::OFileStreambuf(const std::string& filename) :
+  file()
 {
   file = PHYSFS_openWrite(filename.c_str());
   if(file == 0) {
index 4e3d59a..036060d 100644 (file)
@@ -45,6 +45,10 @@ public:
 
 #ifndef SCRIPTING_API
   _Camera* camera;
+
+private:
+  Camera(const Camera&);
+  Camera& operator=(const Camera&);
 #endif
 };
 
index 0889ecc..aa38ee0 100644 (file)
@@ -54,6 +54,10 @@ public:
 
 #ifndef SCRIPTING_API
   _LevelTime* level_time;
+
+private:
+  LevelTime(const LevelTime&);
+  LevelTime& operator=(const LevelTime&);
 #endif
 };
 
index 37c91c2..8548932 100644 (file)
@@ -64,6 +64,10 @@ public:
 
 #ifndef SCRIPTING_API
   _Thunderstorm* thunderstorm;
+
+private:
+  Thunderstorm(const Thunderstorm&);
+  Thunderstorm& operator=(const Thunderstorm&);
 #endif
 };