pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r4020 - in trunk/pingus/src: display editor gui input lisp


From: grumbel at BerliOS
Subject: [Pingus-CVS] r4020 - in trunk/pingus/src: display editor gui input lisp math pingus util
Date: Wed, 4 Nov 2009 15:07:18 +0100

Author: grumbel
Date: 2009-11-04 15:07:13 +0100 (Wed, 04 Nov 2009)
New Revision: 4020

Modified:
   trunk/pingus/src/display/delta_framebuffer.cpp
   trunk/pingus/src/display/opengl_framebuffer.hpp
   trunk/pingus/src/display/scene_context.hpp
   trunk/pingus/src/editor/combobox.cpp
   trunk/pingus/src/editor/level_objs.cpp
   trunk/pingus/src/editor/object_selector.cpp
   trunk/pingus/src/editor/object_selector_list.cpp
   trunk/pingus/src/editor/viewport.cpp
   trunk/pingus/src/gui/rect_component.hpp
   trunk/pingus/src/input/control.hpp
   trunk/pingus/src/input/evdev_device.cpp
   trunk/pingus/src/input/evdev_device.hpp
   trunk/pingus/src/lisp/lexer.hpp
   trunk/pingus/src/lisp/parser.hpp
   trunk/pingus/src/math/rect.cpp
   trunk/pingus/src/math/rect.hpp
   trunk/pingus/src/math/size.cpp
   trunk/pingus/src/math/size.hpp
   trunk/pingus/src/pingus/action_holder.cpp
   trunk/pingus/src/pingus/addon_menu.cpp
   trunk/pingus/src/pingus/capture_rectangle.cpp
   trunk/pingus/src/pingus/collision_mask.cpp
   trunk/pingus/src/pingus/collision_mask.hpp
   trunk/pingus/src/pingus/config_manager.cpp
   trunk/pingus/src/pingus/credits.cpp
   trunk/pingus/src/pingus/demo_session.cpp
   trunk/pingus/src/pingus/direction.cpp
   trunk/pingus/src/pingus/font.cpp
   trunk/pingus/src/pingus/font_description.cpp
   trunk/pingus/src/pingus/font_description.hpp
   trunk/pingus/src/pingus/font_test_screen.cpp
   trunk/pingus/src/pingus/font_test_screen.hpp
   trunk/pingus/src/pingus/fps_counter.cpp
   trunk/pingus/src/pingus/game_session.cpp
   trunk/pingus/src/pingus/graphic_context_state.cpp
   trunk/pingus/src/pingus/ground_map.cpp
   trunk/pingus/src/pingus/layer_manager.cpp
   trunk/pingus/src/pingus/layer_manager.hpp
   trunk/pingus/src/pingus/level_menu.cpp
   trunk/pingus/src/pingus/levelset.cpp
   trunk/pingus/src/pingus/levelset.hpp
   trunk/pingus/src/pingus/mover.cpp
   trunk/pingus/src/pingus/mover.hpp
   trunk/pingus/src/pingus/path_manager.cpp
   trunk/pingus/src/pingus/result.hpp
   trunk/pingus/src/pingus/worldobj.hpp
   trunk/pingus/src/util/command_line.cpp
   trunk/pingus/src/util/command_line.hpp
   trunk/pingus/src/util/command_line_generic.cpp
   trunk/pingus/src/util/command_line_generic.hpp
   trunk/pingus/src/util/debug_stream.cpp
   trunk/pingus/src/util/file_reader.cpp
   trunk/pingus/src/util/file_reader.hpp
   trunk/pingus/src/util/memory_pool.hpp
   trunk/pingus/src/util/pathname.cpp
Log:
A first step to -Weffc++ cleaness


Modified: trunk/pingus/src/display/delta_framebuffer.cpp
===================================================================
--- trunk/pingus/src/display/delta_framebuffer.cpp      2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/display/delta_framebuffer.cpp      2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -39,8 +39,9 @@
   DrawOpType type;
   uint32_t   id;
 
-  DrawOp(DrawOpType type_)
-    : type(type_)
+  DrawOp(DrawOpType type_) :
+    type(type_),
+    id()
   {}
 
   virtual ~DrawOp() {}

Modified: trunk/pingus/src/display/opengl_framebuffer.hpp
===================================================================
--- trunk/pingus/src/display/opengl_framebuffer.hpp     2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/display/opengl_framebuffer.hpp     2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -45,6 +45,10 @@
    void fill_rect(const Rect& rect, const Color& color);
 
   Size get_size() const;
+
+private:
+  OpenGLFramebuffer(const OpenGLFramebuffer&);
+  OpenGLFramebuffer & operator=(const OpenGLFramebuffer&);
 };
 
 #endif

Modified: trunk/pingus/src/display/scene_context.hpp
===================================================================
--- trunk/pingus/src/display/scene_context.hpp  2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/display/scene_context.hpp  2009-11-04 14:07:13 UTC (rev 
4020)
@@ -91,6 +91,10 @@
   SceneContextDrawingRequest(SceneContext* sc, const Vector2i& pos, float z);
   virtual ~SceneContextDrawingRequest();
   void render(Framebuffer& fb, const Rect& render);
+
+private:
+  SceneContextDrawingRequest(const SceneContextDrawingRequest&);
+  SceneContextDrawingRequest& operator=(const SceneContextDrawingRequest&);
 };
 
 #endif

Modified: trunk/pingus/src/editor/combobox.cpp
===================================================================
--- trunk/pingus/src/editor/combobox.cpp        2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/editor/combobox.cpp        2009-11-04 14:07:13 UTC (rev 
4020)
@@ -60,7 +60,7 @@
 {
   if (drop_down)
     return Rect(Vector2i(rect.left, rect.top + get_box_offset()),
-                Size(rect.get_width(), rect.get_height() * 
(item_list.size()))).is_inside(Vector2i(x,y));
+                Size(rect.get_width(), rect.get_height() * 
(item_list.size()))).contains(Vector2i(x,y));
   else
     return RectComponent::is_at(x,y);
 }
@@ -159,7 +159,7 @@
 {
   if (drop_down)
     {
-      if (list_rect.is_inside(Vector2i(x,y)))
+      if (list_rect.contains(Vector2i(x,y)))
         {
           hover_item = (y - list_rect.top) / rect.get_height();
           hover_item = Math::clamp(0, hover_item, int(item_list.size()-1));

Modified: trunk/pingus/src/editor/level_objs.cpp
===================================================================
--- trunk/pingus/src/editor/level_objs.cpp      2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/editor/level_objs.cpp      2009-11-04 14:07:13 UTC (rev 
4020)
@@ -129,7 +129,7 @@
 bool
 LevelObj::is_at(int x, int y)
 {
-  return get_rect().is_inside(Vector2i(x,y));
+  return get_rect().contains(Vector2i(x,y));
 #if 0  
   // old code
   if (attribs & HAS_SURFACE || attribs & HAS_SURFACE_FAKE)

Modified: trunk/pingus/src/editor/object_selector.cpp
===================================================================
--- trunk/pingus/src/editor/object_selector.cpp 2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/editor/object_selector.cpp 2009-11-04 14:07:13 UTC (rev 
4020)
@@ -234,14 +234,14 @@
     gc.draw(sprite, Vector2i(rect.left + 3, rect.top + 3));
 
     if (mouse_over)
-      {
-        int t_w = Fonts::verdana11.get_width(tooltip);
-        Rect t_r(rect.left + 17 - t_w/2 - 4, rect.top + 38 - 2, 
-                 rect.left + 17 + t_w/2 + 4, rect.top + 38 + 
Fonts::verdana11.get_height() + 4);
-        gc.draw_fillrect(t_r, Color(255, 255, 200), 1000.0f);
-        gc.draw_rect(t_r, Color(0,0,0), 1000.0f);
-        gc.print_center(Fonts::verdana11, Vector2i(rect.left + 17, rect.top + 
38), tooltip, 1000.0f);
-      }
+    {
+      int t_w = Fonts::verdana11.get_width(tooltip);
+      Rect t_r(rect.left + 17 - t_w/2 - 4, rect.top + 38 - 2, 
+               rect.left + 17 + t_w/2 + 4, rect.top + 38 + 
Fonts::verdana11.get_height() + 4);
+      gc.draw_fillrect(t_r, Color(255, 255, 200), 1000.0f);
+      gc.draw_rect(t_r, Color(0,0,0), 1000.0f);
+      gc.print_center(Fonts::verdana11, Vector2i(rect.left + 17, rect.top + 
38), tooltip, 1000.0f);
+    }
   }
 
   /** Emmitted when pointer enters the region of the component */
@@ -282,10 +282,24 @@
 
 
 
-ObjectSelector::ObjectSelector(EditorScreen* editor_, const Rect& rect_)
-  : GroupComponent(rect_, false),
-    editor(editor_),
-    button_pos(0,0)
+ObjectSelector::ObjectSelector(EditorScreen* editor_, const Rect& rect_) :
+  GroupComponent(rect_, false),
+  editor(editor_),
+  button_pos(0,0),
+  object_list(0),
+  gp_ground_set(0),
+  gp_solid_set(0),
+  gp_bridge_set(0),
+  gp_transparent_set(0),
+  gp_remove_set(0),
+  hotspot_set(0),
+  background_set(0),
+  entrance_set(0),
+  exit_set(0),
+  liquid_set(0),
+  trap_set(0),
+  weather_set(0),
+  worldobj_set(0)
 {
   add(object_list = new ObjectSelectorList(editor, this, 
                                            Rect(2, 2 + 60 + 2, 
rect.get_width() - 2, rect.get_height() - 2)));
@@ -349,17 +363,17 @@
 {
   ObjectSelectorButton* button;
   add(button = new ObjectSelectorButton(object_list,
-                               Vector2i(2 + button_pos.x * 30,  
-                                        2 + button_pos.y * 30),
-                               image, tooltip));
+                                        Vector2i(2 + button_pos.x * 30,  
+                                                 2 + button_pos.y * 30),
+                                        image, tooltip));
   button->on_click.connect(boost::bind(&ObjectSelectorList::set_objects, 
object_list, set));
 
   button_pos.x += 1;
   if (button_pos.x > 7)
-    {
-      button_pos.x  = 0;
-      button_pos.y += 1;
-    }
+  {
+    button_pos.x  = 0;
+    button_pos.y += 1;
+  }
 }
 
 ObjectSelectorSet*
@@ -370,11 +384,11 @@
   // FIXME: Simple debugging aid, needs to be replaced with custom code for 
the object types
   std::vector<std::string> lst = Resource::resmgr.get_section(prefix);
   for(std::vector<std::string>::const_iterator i = lst.begin(); i != 
lst.end(); ++i)
-    {
-      // need to reset the align to top/left
-      set->add(new ObjectSelectorList::Object(Sprite(*i),
-                                              
Resource::load_thumb_sprite(*i)));
-    }
+  {
+    // need to reset the align to top/left
+    set->add(new ObjectSelectorList::Object(Sprite(*i),
+                                            Resource::load_thumb_sprite(*i)));
+  }
   
   return set;
 }
@@ -386,10 +400,10 @@
 
   std::vector<std::string> lst = Resource::resmgr.get_section(prefix);
   for(std::vector<std::string>::const_iterator i = lst.begin(); i != 
lst.end(); ++i)
-    {
-      //sprite.scale(48, 48);
-      set->add(new Groundpiece(*i, type));
-    }
+  {
+    //sprite.scale(48, 48);
+    set->add(new Groundpiece(*i, type));
+  }
 
   return set;
 }
@@ -460,11 +474,11 @@
 
   std::vector<std::string> lst = Resource::resmgr.get_section("entrances");
   for(std::vector<std::string>::const_iterator i = lst.begin(); i != 
lst.end(); ++i)
-    {
-      //sprite.scale(48, 48);
-      if (*i != "entrances/generic")
-        set->add(new Hotspot(*i, 100));
-    }
+  {
+    //sprite.scale(48, 48);
+    if (*i != "entrances/generic")
+      set->add(new Hotspot(*i, 100));
+  }
 
   return set;
 }
@@ -472,29 +486,29 @@
 ObjectSelectorSet*
 ObjectSelector::create_exit()
 {
- ObjectSelectorSet* set = new ObjectSelectorSet(object_list, 48, 48);
+  ObjectSelectorSet* set = new ObjectSelectorSet(object_list, 48, 48);
 
- std::vector<std::string> lst = Resource::resmgr.get_section("exit");
- for(std::vector<std::string>::const_iterator i = lst.begin(); i != lst.end(); 
++i)
-    {
-      set->add(new Exit(*i));
-    }
+  std::vector<std::string> lst = Resource::resmgr.get_section("exit");
+  for(std::vector<std::string>::const_iterator i = lst.begin(); i != 
lst.end(); ++i)
+  {
+    set->add(new Exit(*i));
+  }
  
- return set;
+  return set;
 }
 
 ObjectSelectorSet*
 ObjectSelector::create_liquid()
 {
- ObjectSelectorSet* set = new ObjectSelectorSet(object_list, 48, 48);
+  ObjectSelectorSet* set = new ObjectSelectorSet(object_list, 48, 48);
 
- std::vector<std::string> lst = Resource::resmgr.get_section("liquids");
- for(std::vector<std::string>::const_iterator i = lst.begin(); i != lst.end(); 
++i)
-    {
-      set->add(new Liquid(*i));
-    }
+  std::vector<std::string> lst = Resource::resmgr.get_section("liquids");
+  for(std::vector<std::string>::const_iterator i = lst.begin(); i != 
lst.end(); ++i)
+  {
+    set->add(new Liquid(*i));
+  }
 
- return set;
+  return set;
 }
 
 ObjectSelectorSet*

Modified: trunk/pingus/src/editor/object_selector_list.cpp
===================================================================
--- trunk/pingus/src/editor/object_selector_list.cpp    2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/editor/object_selector_list.cpp    2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -125,8 +125,8 @@
           // is the Viewport, else no drag should take place, this
           // checks if the current mouse_over_comp is the
           // ObjectSelector, which is good enough but not perfect 
-          if (!object_selector->get_rect().is_inside(Vector2i(x + 
object_selector->get_rect().left,
-                                                              y + 
object_selector->get_rect().top)))
+          if (!object_selector->get_rect().contains(Vector2i(x + 
object_selector->get_rect().left,
+                                                             y + 
object_selector->get_rect().top)))
             {
               Vector2i p = editor->get_viewport()->screen2world(x + 
object_selector->get_rect().left,
                                                                 y + 
object_selector->get_rect().top);

Modified: trunk/pingus/src/editor/viewport.cpp
===================================================================
--- trunk/pingus/src/editor/viewport.cpp        2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/editor/viewport.cpp        2009-11-04 14:07:13 UTC (rev 
4020)
@@ -134,8 +134,8 @@
       highlighted_area.normalize();
       for (unsigned i = 0; i < get_objects()->size(); i++)
         {
-          if 
(highlighted_area.is_inside(Vector2i(int((*get_objects())[i]->get_pos().x),
-                                                  
int((*get_objects())[i]->get_pos().y))))
+          if 
(highlighted_area.contains(Vector2i(int((*get_objects())[i]->get_pos().x),
+                                                 
int((*get_objects())[i]->get_pos().y))))
             {
               selected_objs.push_back((*get_objects())[i]);
               (*get_objects())[i]->select();
@@ -336,7 +336,7 @@
 bool
 Viewport::is_at(int x, int y)
 {
-  return drawing_context->get_rect().is_inside(Vector2i(x,y));
+  return drawing_context->get_rect().contains(Vector2i(x,y));
 }
 
 void

Modified: trunk/pingus/src/gui/rect_component.hpp
===================================================================
--- trunk/pingus/src/gui/rect_component.hpp     2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/gui/rect_component.hpp     2009-11-04 14:07:13 UTC (rev 
4020)
@@ -33,7 +33,7 @@
     : rect(rect_)
   {}
   
-  virtual bool is_at (int x, int y) { return rect.is_inside(Vector2i(x, y)); }
+  virtual bool is_at (int x, int y) { return rect.contains(Vector2i(x, y)); }
   virtual void update_layout() {}
   
   void set_rect(const Rect& rect_) 

Modified: trunk/pingus/src/input/control.hpp
===================================================================
--- trunk/pingus/src/input/control.hpp  2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/input/control.hpp  2009-11-04 14:07:13 UTC (rev 4020)
@@ -27,7 +27,8 @@
 
 namespace Input {
 
-class Control {
+class Control 
+{
 private:
   Control* parent;
   
@@ -57,6 +58,10 @@
   virtual void update(Control* ctrl) {
     std::cout << "Warning: Control:update() not handled" << std::endl;
   }
+
+private:
+  Control(const Control&);
+  Control & operator=(const Control&);
 };
 
 class Button : public Control 
@@ -89,7 +94,8 @@
   
 public: 
   ButtonGroup(Control* parent_) :
-    Button(parent_)
+    Button(parent_),
+    buttons()
   {}
 
   ~ButtonGroup()
@@ -142,6 +148,10 @@
   virtual void notify_parent() {
     controller->add_button_event(id, state);
   }
+
+private:
+  ControllerButton(const ControllerButton&);
+  ControllerButton & operator=(const ControllerButton&);
 };
 
 class Axis : public Control 
@@ -183,7 +193,8 @@
 
 public:
   Pointer(Control* parent_) :
-    Control(parent_)
+    Control(parent_),
+    pos()
   {}
 
   Vector2f get_pos() const { return pos; }
@@ -225,7 +236,8 @@
 
 public:
   AxisGroup(Control* parent_) :
-    Axis(parent_)
+    Axis(parent_),
+    axes()
   {}
 
   ~AxisGroup()
@@ -329,6 +341,10 @@
   virtual void notify_parent() {
     controller->add_pointer_event(id, pos.x, pos.y);
   }
+
+private:
+  ControllerPointer(const ControllerPointer&);
+  ControllerPointer & operator=(const ControllerPointer&);
 };
 
 class ScrollerGroup : public Scroller 
@@ -362,6 +378,10 @@
   void add_scroller(Scroller* p) {
     scrollers.push_back(p);
   }
+
+private:
+  ScrollerGroup(const ScrollerGroup&);
+  ScrollerGroup & operator=(const ScrollerGroup&);
 };
 
 class ControllerScroller : public ScrollerGroup
@@ -380,6 +400,10 @@
   virtual void notify_parent() {
     controller->add_scroller_event(id, delta.x, delta.y);
   }
+
+private:
+  ControllerScroller(const ControllerScroller&);
+  ControllerScroller & operator=(const ControllerScroller&);
 };
 
 class Keyboard : public Control
@@ -389,11 +413,16 @@
 
 public:
   Keyboard(Control* parent_) :
-    Control(parent_)
+    Control(parent_),
+    chr()
   {}
 
   void send_char(unsigned short c) { chr = c; notify_parent(); }
   unsigned short get_char() { return chr; }
+
+private:
+  Keyboard(const Keyboard&);
+  Keyboard & operator=(const Keyboard&);
 };
 
 class KeyboardGroup : public Keyboard
@@ -442,6 +471,10 @@
   virtual void notify_parent() {
     controller->add_keyboard_event(chr);
   }
+
+private:
+  ControllerKeyboard(const ControllerKeyboard&);
+  ControllerKeyboard & operator=(const ControllerKeyboard&);
 };
 
 } // namespace Input

Modified: trunk/pingus/src/input/evdev_device.cpp
===================================================================
--- trunk/pingus/src/input/evdev_device.cpp     2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/input/evdev_device.cpp     2009-11-04 14:07:13 UTC (rev 
4020)
@@ -35,8 +35,14 @@
 
 namespace Input {
 
-EvdevDevice::EvdevDevice(const std::string& filename)
-  : device(filename)
+EvdevDevice::EvdevDevice(const std::string& filename) :
+  fd(),
+  version(),
+  relatives(),
+  absolutes(),
+  keys(),
+  name(),
+  device(filename)
 {
   fd = open(device.c_str(), O_RDONLY | O_NONBLOCK);
 

Modified: trunk/pingus/src/input/evdev_device.hpp
===================================================================
--- trunk/pingus/src/input/evdev_device.hpp     2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/input/evdev_device.hpp     2009-11-04 14:07:13 UTC (rev 
4020)
@@ -44,7 +44,12 @@
        
   // Relative Input Event
   struct Relative {
-    Relative(int code_) : code(code_), pos(0) {}
+    Relative(int code_) : 
+      code(code_),
+      pos(0),
+      bindings()
+    {}
+
     int code;
     int pos;
 
@@ -54,7 +59,7 @@
 
   // Key Input Event
   struct Key {
-    Key(int code_) : code(code_), pressed(false) {}
+    Key(int code_) : code(code_), pressed(false), bindings() {}
     int code;
     bool pressed;
     std::vector<Button*> bindings;

Modified: trunk/pingus/src/lisp/lexer.hpp
===================================================================
--- trunk/pingus/src/lisp/lexer.hpp     2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/lisp/lexer.hpp     2009-11-04 14:07:13 UTC (rev 4020)
@@ -61,6 +61,10 @@
   char* c;
   char token_string[MAX_TOKEN_LENGTH + 1];
   int token_length;
+
+private:
+  Lexer(const Lexer&);
+  Lexer & operator=(const Lexer&);
 };
 
 } // end of namespace lisp

Modified: trunk/pingus/src/lisp/parser.hpp
===================================================================
--- trunk/pingus/src/lisp/parser.hpp    2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/lisp/parser.hpp    2009-11-04 14:07:13 UTC (rev 4020)
@@ -44,6 +44,10 @@
   std::string filename;
   Lexer* lexer;
   Lexer::TokenType token;
+
+private:
+  Parser(const Parser&);
+  Parser & operator=(const Parser&);
 };
 
 } // end of namespace lisp

Modified: trunk/pingus/src/math/rect.cpp
===================================================================
--- trunk/pingus/src/math/rect.cpp      2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/math/rect.cpp      2009-11-04 14:07:13 UTC (rev 4020)
@@ -40,4 +40,10 @@
            << rect.right << ", " << rect.bottom << ")";
 }
 
+std::ostream& operator<<(std::ostream& s, const Rectf& rect)
+{
+  return s << "Rect(" << rect.left << ", " << rect.top << ", "
+           << rect.right << ", " << rect.bottom << ")";
+}
+
 /* EOF */

Modified: trunk/pingus/src/math/rect.hpp
===================================================================
--- trunk/pingus/src/math/rect.hpp      2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/math/rect.hpp      2009-11-04 14:07:13 UTC (rev 4020)
@@ -30,10 +30,11 @@
 #ifndef __MATH_RECT_HPP__
 #define __MATH_RECT_HPP__
 
-#include <iosfwd>
+#include <math.h>
+
 #include "math/origin.hpp"
-#include "math/vector3f.hpp"
-#include "math/size.hpp"
+#include "math/vector2f.hpp"
+#include "math/math.hpp"
 
 class Rectf;
 
@@ -52,20 +53,36 @@
   //param point: Initial top-left position of rectangle.
   //param size: Initial size of rectangle.
   //param rect: Initial rectangle position and size.
-  Rect() { left = right = top = bottom = 0; }
+  Rect() 
+    : left(0),
+      top(0),
+      right(0),
+      bottom(0)
+  {}
 
   explicit Rect(const Rectf& rect);
 
   Rect(int new_left, int new_top, int new_right, int new_bottom)
-  { left = new_left; top = new_top; right = new_right; bottom = new_bottom; }
+    : left(new_left),
+      top(new_top),
+      right(new_right),
+      bottom(new_bottom)
+  {}
 
   Rect(const Vector2i &p, const Size &size)
-  { left = p.x; top = p.y; right = left + size.width; bottom = top + 
size.height; }
+    : left(p.x),
+      top(p.y),
+      right(left + size.width),
+      bottom(top + size.height) 
+  {}
 
   Rect(const Rect &rect)
-  { left = rect.left; top = rect.top; right = rect.right; bottom = 
rect.bottom; }
+    : left(rect.left),
+      top(rect.top),
+      right(rect.right),
+      bottom(rect.bottom)
+  {}
 
-  // Moves each edge b away from the center, thus width = old_width + 2*b
   Rect grow(int b) const {
     return Rect(left   - b, 
                 top    - b,
@@ -81,11 +98,11 @@
   Rect &operator-=(const Rect &r)
   { left -= r.left; top -= r.top; right -= r.right; bottom -= r.bottom; return 
*this; }
        
-  //: Rect += Point operator.
+  //: Rect += Vector2i operator.
   Rect &operator+=(const Vector2i &p)
   { left += p.x; top += p.y; right += p.x; bottom += p.y; return *this; }
 
-  //: Rect -= Point operator.
+  //: Rect -= Vector2i operator.
   Rect &operator-=(const Vector2i &p)
   { left -= p.x; top -= p.y; right -= p.x; bottom -= p.y; return *this; }
 
@@ -97,11 +114,11 @@
   Rect operator-(const Rect &r) const
   { return Rect(left - r.left, top - r.top, right - r.right, bottom - 
r.bottom); }
 
-  //: Rect + Point operator.
+  //: Rect + Vector2i operator.
   Rect operator+(const Vector2i &p) const
   { return Rect(left + p.x, top + p.y, right + p.x, bottom + p.y); }
 
-  //: Rect - Point operator.
+  //: Rect - Vector2i operator.
   Rect operator-(const Vector2i &p) const
   { return Rect(left - p.x, top - p.y, right - p.x, bottom - p.y); }
 
@@ -135,21 +152,28 @@
 
   //: Returns the size of the rectangle.
   Size get_size() const { return Size(right - left, bottom - top); }
-       
-  //: Returns true if point is inside the rectangle.
-  bool is_inside(const Vector2i &p) const { return (p.x >= left && p.y >= top 
&& p.x <= right && p.y <= bottom); }
-
+  
   //: Returns true if rectangle passed is overlapping or inside this rectangle.
   bool is_overlapped(const Rect &r) const 
   {
     return (r.left < right && r.right > left && r.top < bottom && r.bottom > 
top);
   }
 
-  bool is_normal() const 
+  bool contains(const Vector2i& pos) const
   {
-    return left <= right && top <= bottom;
+    return
+      left <= pos.x && pos.x < right &&
+      top  <= pos.y && pos.y < bottom;
   }
-
+       
+  //: Returns another Rect containing a rotated version of this one.
+  //param hotspot: Vector2i to rotate around.
+  //param origin: Determines the hotspot point within the rectangle
+  //param x, y: Offsets applied negatively to the hotspot point
+  //param angle: Angle to rotate in degrees.
+  Rect get_rot_bounds(const Vector2i &hotspot, float angle) const;
+  Rect get_rot_bounds(Origin origin, int x, int y, float angle) const;
+       
   //! Operations:
 public:
   //: Sets the size of the rectangle, maintaining top/left position.
@@ -170,22 +194,27 @@
     return result;
   }
 
+  bool is_normal() const 
+  {
+    return left <= right && top <= bottom;
+  }
+
   //: Normalize rectangle. Ensures that left is less than right and top is 
less than bottom.
   void normalize()
   {
     if (left > right)
-      {
-        int temp = right;
-        right = left;
-        left = temp;
-      }
+    {
+      int temp = right;
+      right = left;
+      left = temp;
+    }
 
     if (top > bottom)
-      {
-        int temp = bottom;
-        bottom = top;
-        top = temp;
-      }
+    {
+      int temp = bottom;
+      bottom = top;
+      top = temp;
+    }
   }
        
   //: Applies an origin and offset pair to this rectangle
@@ -217,23 +246,47 @@
   //param point: Initial top-left position of rectangle.
   //param size: Initial size of rectangle.
   //param rect: Initial rectangle position and size.
-  Rectf() { left = right = top = bottom = 0.0f; }
+  Rectf()
+    : left(0.0f),
+      top(0.0f),
+      right(0.0f),
+      bottom(0.0f)
+  {}
 
   Rectf(const Rect& rect)
-    : left(static_cast<float>(rect.left)), 
-      top(static_cast<float>(rect.top)), 
-      right(static_cast<float>(rect.right)), 
-      bottom(static_cast<float>(rect.bottom))
+    : left((float)rect.left), 
+      top((float)rect.top), 
+      right((float)rect.right), 
+      bottom((float)rect.bottom)
   {}
 
   Rectf(float new_left, float new_top, float new_right, float new_bottom)
-  { left = new_left; top = new_top; right = new_right; bottom = new_bottom; }
+    : left(new_left),
+      top(new_top),
+      right(new_right),
+      bottom(new_bottom)
+  {}
 
-  Rectf(const Vector3f &p, const Sizef &size)
-  { left = p.x; top = p.y; right = left + size.width; bottom = top + 
size.height; }
+  Rectf(const Vector2f &p, const Sizef &size)
+    : left(p.x),
+      top(p.y),
+      right(left + size.width),
+      bottom(top + size.height)
+  {}
 
+  Rectf(const Vector2f& p1, const Vector2f& p2)
+    :  left(p1.x),
+       top(p1.y),
+       right(p2.x),
+       bottom(p2.y)
+  {}
+
   Rectf(const Rectf &rect)
-  { left = rect.left; top = rect.top; right = rect.right; bottom = 
rect.bottom; }
+    : left(rect.left),
+      top(rect.top),
+      right(rect.right),
+      bottom(rect.bottom)
+  {}
 
   //: Rect += Rect operator.
   Rectf &operator+=(const Rectf &r)
@@ -243,12 +296,12 @@
   Rectf &operator-=(const Rectf &r)
   { left -= r.left; top -= r.top; right -= r.right; bottom -= r.bottom; return 
*this; }
        
-  //: Rect += Point operator.
-  Rectf &operator+=(const Vector3f &p)
+  //: Rect += Vector2i operator.
+  Rectf &operator+=(const Vector2f &p)
   { left += p.x; top += p.y; right += p.x; bottom += p.y; return *this; }
 
-  //: Rect -= Point operator.
-  Rectf &operator-=(const Vector3f &p)
+  //: Rect -= Vector2i operator.
+  Rectf &operator-=(const Vector2f &p)
   { left -= p.x; top -= p.y; right -= p.x; bottom -= p.y; return *this; }
 
   //: Rect + Rect operator.
@@ -259,12 +312,12 @@
   Rectf operator-(const Rectf &r) const
   { return Rectf(left - r.left, top - r.top, right - r.right, bottom - 
r.bottom); }
 
-  //: Rect + Point operator.
-  Rectf operator+(const Vector3f &p) const
+  //: Rect + Vector2i operator.
+  Rectf operator+(const Vector2f &p) const
   { return Rectf(left + p.x, top + p.y, right + p.x, bottom + p.y); }
 
-  //: Rect - Point operator.
-  Rectf operator-(const Vector3f &p) const
+  //: Rect - Vector2i operator.
+  Rectf operator-(const Vector2f &p) const
   { return Rectf(left - p.x, top - p.y, right - p.x, bottom - p.y); }
 
   //: Rect == Rect operator.
@@ -299,7 +352,7 @@
   Sizef get_size() const { return Sizef(right - left, bottom - top); }
        
   //: Returns true if point is inside the rectangle.
-  bool is_inside(const Vector3f &p) const { return (p.x >= left && p.y >= top 
&& p.x <= right && p.y <= bottom); }
+  bool is_inside(const Vector2f &p) const { return (p.x >= left && p.y >= top 
&& p.x <= right && p.y <= bottom); }
        
   //: Returns true if rectangle passed is overlapping or inside this rectangle.
   bool is_overlapped(const Rectf &r) const 
@@ -312,8 +365,8 @@
   //: Sets the size of the rectangle, maintaining top/left position.
   void set_size(const Size &size)
   {
-    right = left + size.width;
-    bottom = top + size.height;
+    right  = left + static_cast<float>(size.width);
+    bottom = top  + static_cast<float>(size.height);
   }
 
   //: Calculates and returns the union of two rectangles.
@@ -326,17 +379,52 @@
     if (bottom < rect.bottom) result.bottom = bottom; else result.bottom = 
rect.bottom;
     return result;
   }
+  
+  bool is_normal() const 
+  {
+    return left <= right && top <= bottom;
+  }
 
   //: Normalize rectangle. Ensures that left<right and top<bottom.
   void normalize()
   {
     if (left > right)
-      std::swap(left, right);
-    
+    {
+      float temp = right;
+      right = left;
+      left = temp;
+    }
+
     if (top > bottom)
-      std::swap(top, bottom);
+    {
+      float temp = bottom;
+      bottom = top;
+      top = temp;
+    }
   }
 
+  /*   
+  //: Applies an origin and offset pair to this rectangle
+  //param origin: The new origin to adjust to from default upper-left position
+  //param x, y: Offsets applied negatively to each corner of the rectangle
+  void apply_alignment(Origin origin, float x, float y)
+  {
+    Vector2f offset = calc_origin(origin, get_size());
+    offset.x -= x;
+    offset.y -= y;
+               
+    left += offset.x;
+    top += offset.y;
+    right += offset.x;
+    bottom += offset.y;
+  }
+  */
+
+  Vector2f get_center() const {
+    return Vector2f((left + right) / 2.0f,
+                    (top + bottom) / 2.0f);
+  }
+
   // Moves each edge f away from the center, thus width = old_width + 2*f
   Rectf grow(float f) const {
     return Rectf(left   - f, 
@@ -344,6 +432,47 @@
                  right  + f,
                  bottom + f);
   }
+
+  Rectf grow(float x, float y) const {
+    return Rectf(left   - x, 
+                 top    - y,
+                 right  + x,
+                 bottom + y);
+  }
+  
+  // Construct a rectangle large enough
+  Rectf grow(const Rectf& rect) const {
+    return Rectf(Math::min(left, rect.left),
+                 Math::min(top, rect.top),
+                 Math::max(right, rect.right),
+                 Math::max(bottom, rect.bottom));
+  }
+  
+  float get_diagonal() const
+  {
+    return sqrtf((get_width() * get_width()) + (get_height() * get_height()));
+  }
+
+  //: Returns true if point is inside the rectangle.
+  bool contains(const Vector2f &p) const { return (p.x >= left && p.y >= top 
&& p.x <= right && p.y <= bottom); }
+
+  //: Check if rect is inside this
+  bool contains(const Rectf& rect) const
+  {
+    return 
+      left   <= rect.left  &&
+      right  >= rect.right &&
+      top    <= rect.top   &&
+      bottom >= rect.bottom;
+  }
+
+  Rectf clip_to(const Rectf& cliprect) const 
+  {
+    return Rectf(Math::max(left,   cliprect.left),
+                 Math::max(top,    cliprect.top),
+                 Math::min(right,  cliprect.right),
+                 Math::min(bottom, cliprect.bottom));
+  }
 };
 
 inline Rect::Rect(const Rectf& rect)
@@ -353,7 +482,8 @@
     bottom(static_cast<int>(rect.bottom))
 {}
 
-std::ostream& operator<<(std::ostream& s, const Rect& r);
+std::ostream& operator<<(std::ostream& s, const Rect& rect);
+std::ostream& operator<<(std::ostream& s, const Rectf& rect);
 
 #endif
 

Modified: trunk/pingus/src/math/size.cpp
===================================================================
--- trunk/pingus/src/math/size.cpp      2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/math/size.cpp      2009-11-04 14:07:13 UTC (rev 4020)
@@ -23,7 +23,6 @@
 **/
 
 #include <iostream>
-
 #include "math/size.hpp"
 
 std::ostream& operator<<(std::ostream& os, const Size& size)

Modified: trunk/pingus/src/math/size.hpp
===================================================================
--- trunk/pingus/src/math/size.hpp      2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/math/size.hpp      2009-11-04 14:07:13 UTC (rev 4020)
@@ -30,8 +30,8 @@
 //! clanCore="Math"
 //! header=core.h
 
-#ifndef HEADER_PINGUS_MATH_SIZE_HPP
-#define HEADER_PINGUS_MATH_SIZE_HPP
+#ifndef HEADER_GALAPIX_MATH_SIZE_HPP
+#define HEADER_GALAPIX_MATH_SIZE_HPP
 
 #if _MSC_VER > 1000
 #pragma once
@@ -40,127 +40,160 @@
 #include <iosfwd>
 
 class Sizef;
-
+
 //: 2D (width,height) size structure.
 //- !group=Core/Math!
 //- !header=core.h!
 class Size
 {
-//! Construction:
+  //! Construction:
 public:
-       //: Constructs a size structure.
-       //param width: Initial width of size structure.
-       //param height: Initial height of size structure.
-       //param size: Size structure to construct this one from.
-       Size() : width(0), height(0) { return; }
+  //: Constructs a size structure.
+  //param width: Initial width of size structure.
+  //param height: Initial height of size structure.
+  //param size: Size structure to construct this one from.
+  Size() 
+    : width(0), height(0)
+  {}
 
-       Size(int width_, int height_)
-       : width(width_), height(height_) { }
+  Size(int width_, int height_)
+    : width(width_), height(height_) 
+  {}
 
-       Size(const Size &s)
-       { width = s.width; height = s.height; }
+  Size(const Size &s)
+    : width(s.width),
+      height(s.height)
+  {}
 
-       explicit Size(const Sizef& s);
+  explicit Size(const Sizef& s);
 
-//! Attributes:
+  //! Attributes:
 public:
-       //: Size width.
-       int width;
+  //: Size width.
+  int width;
 
-       //: Size height.
-       int height;
+  //: Size height.
+  int height;
 
-//! Operations:
+  //! Operations:
 public:
-       //: Size += Size operator.
-       Size &operator+=(const Size &s)
-       { width += s.width; height += s.height; return *this; }
+  //: Size += Size operator.
+  Size &operator+=(const Size &s)
+  { width += s.width; height += s.height; return *this; }
 
-       //: Size -= Size operator.
-       Size &operator-=(const Size &s)
-       { width -= s.width; height -= s.height; return *this; }
+  //: Size -= Size operator.
+  Size &operator-=(const Size &s)
+  { width -= s.width; height -= s.height; return *this; }
        
-       //: Size + Size operator.
-       Size operator+(const Size &s) const
-       { return Size(width + s.width, height + s.height); }
+  //: Size + Size operator.
+  Size operator+(const Size &s) const
+  { return Size(width + s.width, height + s.height); }
 
-       //: Size - Size operator.
-       Size operator-(const Size &s) const
-       { return Size(width - s.width, height - s.height); }
+  //: Size - Size operator.
+  Size operator-(const Size &s) const
+  { return Size(width - s.width, height - s.height); }
 
-       //: Size == Size operator (deep compare).
-       bool operator==(const Size &s) const
-       { return (width == s.width) && (height == s.height); }
+  //: Size == Size operator (deep compare).
+  bool operator==(const Size &s) const
+  { return (width == s.width) && (height == s.height); }
 
-       //: Size != Size operator (deep compare).
-       bool operator!=(const Size &s) const
-       { return (width != s.width) || (height != s.height); }
-  
-       int get_area() const { return width * height; }
+  //: Size != Size operator (deep compare).
+  bool operator!=(const Size &s) const
+  { return (width != s.width) || (height != s.height); }
+
+  //: Size / int operator.
+  Size operator/(int a)
+  { return Size(width / a, height / a); }
+
+  //: Size /= Size operator.
+  Size &operator/=(int a)
+  { width /= a; height /= a; return *this; }
+
+  int get_area() const { return width * height; }
 };
-
+
 //: 2D (width,height) floating point size structure.
 class Sizef
 {
-//! Construction:
+  //! Construction:
 public:
-       //: Constructs a size structure.
-       //param width: Initial width of size structure.
-       //param height: Initial height of size structure.
-       //param size: Size structure to construct this one from.
-       Sizef() : width(0.f), height(0.f) { return; }
+  //: Constructs a size structure.
+  //param width: Initial width of size structure.
+  //param height: Initial height of size structure.
+  //param size: Size structure to construct this one from.
+  Sizef() 
+    : width(0.0f),
+      height(0.0f)
+  {}
 
-       Sizef(const Size& s) 
-          : width(static_cast<float>(s.width)),
-            height(static_cast<float>(s.height))
-       {}
+  Sizef(const Size& s) 
+    : width(static_cast<float>(s.width)),
+      height(static_cast<float>(s.height))
+  {}
 
-       Sizef(float width_, float height_)
-       : width(width_), height(height_) { }
+  Sizef(float width_, float height_)
+    : width(width_), 
+      height(height_) 
+  {}
 
-       Sizef(const Sizef &s)
-       { width = s.width; height = s.height; }
+  Sizef(const Sizef &s)
+    : width(s.width),
+      height(s.height)
+  {}
 
-//! Attributes:
+  //! Attributes:
 public:
-       //: Size width.
-       float width;
+  //: Size width.
+  float width;
 
-       //: Size height.
-       float height;
+  //: Size height.
+  float height;
 
-//! Operations:
+  //! Operations:
 public:
-       //: Size += Size operator.
-       Sizef &operator+=(const Sizef &s)
-       { width += s.width; height += s.height; return *this; }
+  //: Size += Size operator.
+  Sizef &operator+=(const Sizef &s)
+  { width += s.width; height += s.height; return *this; }
 
-       //: Size -= Size operator.
-       Sizef &operator-=(const Sizef &s)
-       { width -= s.width; height -= s.height; return *this; }
+  //: Size -= Size operator.
+  Sizef &operator-=(const Sizef &s)
+  { width -= s.width; height -= s.height; return *this; }
        
-       //: Size + Size operator.
-       Sizef operator+(const Sizef &s) const
-       { return Sizef(width + s.width, height + s.height); }
+  //: Size + Size operator.
+  Sizef operator+(const Sizef &s) const
+  { return Sizef(width + s.width, height + s.height); }
 
-       //: Size - Size operator.
-       Sizef operator-(const Sizef &s) const
-       { return Sizef(width - s.width, height - s.height); }
+  //: Size - Size operator.
+  Sizef operator-(const Sizef &s) const
+  { return Sizef(width - s.width, height - s.height); }
 
-       //: Size == Size operator (deep compare).
-       bool operator==(const Sizef &s) const
-       { return (width == s.width) && (height == s.height); }
+  //: Size == Size operator (deep compare).
+  bool operator==(const Sizef &s) const
+  { return (width == s.width) && (height == s.height); }
 
-       //: Size != Size operator (deep compare).
-       bool operator!=(const Size &s) const
-       { return (width != s.width) || (height != s.height); }
+  //: Size != Size operator (deep compare).
+  bool operator!=(const Size &s) const
+  { return (width != s.width) || (height != s.height); }
+
+  //: Size *= Size operator.
+  Sizef &operator*=(float v)
+  { width *= v; height *= v; return *this; }
+
+  //: Size /= Size operator.
+  Sizef &operator/=(float v)
+  { width /= v; height /= v; return *this; }
 };
-
+
+inline Sizef operator*(const Sizef& s, float f)
+{
+  return Sizef(s.width * f, s.height * f);
+}
+
 inline Size::Size(const Sizef& s)
-       : width(static_cast<int>(s.width)),
-         height(static_cast<int>(s.height))
+  : width(static_cast<int>(s.width)),
+    height(static_cast<int>(s.height))
 {}
-
-std::ostream& operator<<(std::ostream& os, const Size& size);
-
+
+std::ostream& operator<<(std::ostream& s, const Size& size);
+
 #endif

Modified: trunk/pingus/src/pingus/action_holder.cpp
===================================================================
--- trunk/pingus/src/pingus/action_holder.cpp   2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/action_holder.cpp   2009-11-04 14:07:13 UTC (rev 
4020)
@@ -21,7 +21,8 @@
 
 using namespace Actions;
 
-ActionHolder::ActionHolder(const PingusLevel& plf)
+ActionHolder::ActionHolder(const PingusLevel& plf) :
+  available_actions()
 {
   const std::map<std::string, int>& actions = plf.get_actions();
 

Modified: trunk/pingus/src/pingus/addon_menu.cpp
===================================================================
--- trunk/pingus/src/pingus/addon_menu.cpp      2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/addon_menu.cpp      2009-11-04 14:07:13 UTC (rev 
4020)
@@ -22,7 +22,9 @@
 #include "pingus/option_menu.hpp"
 #include "pingus/addon_menu.hpp"
 
-AddOnMenu::AddOnMenu()
+AddOnMenu::AddOnMenu() :
+  background(),
+  ok_button()
 {
   background = Sprite("core/menu/filedialog");
   ok_button  = Sprite("core/start/ok");

Modified: trunk/pingus/src/pingus/capture_rectangle.cpp
===================================================================
--- trunk/pingus/src/pingus/capture_rectangle.cpp       2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/pingus/capture_rectangle.cpp       2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -26,15 +26,16 @@
 #include "pingus/server.hpp"
 #include "util/string_util.hpp"
 
-CaptureRectangle::CaptureRectangle(GameSession* session_)
-  : session(session_),
-    pingu(0),
-    owner_id(0),
-    good("game/cursors/capgood"),
-    bad("game/cursors/capbad"),
-    arrow_left("game/cursors/arrow_left"),
-    arrow_right("game/cursors/arrow_right"),
-    font(Fonts::courier_small)
+CaptureRectangle::CaptureRectangle(GameSession* session_) :
+  session(session_),
+  pingu(0),
+  action_str(),
+  owner_id(0),
+  good("game/cursors/capgood"),
+  bad("game/cursors/capbad"),
+  arrow_left("game/cursors/arrow_left"),
+  arrow_right("game/cursors/arrow_right"),
+  font(Fonts::courier_small)
 {
 }
 

Modified: trunk/pingus/src/pingus/collision_mask.cpp
===================================================================
--- trunk/pingus/src/pingus/collision_mask.cpp  2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/collision_mask.cpp  2009-11-04 14:07:13 UTC (rev 
4020)
@@ -19,25 +19,39 @@
 #include "util/system.hpp"
 #include "pingus/collision_mask.hpp"
 
-CollisionMask::CollisionMask()
-  : buffer(0)
+CollisionMask::CollisionMask() :
+  surface(),
+  buffer(),
+  width(),
+  height()
 {
 }
 
-CollisionMask::CollisionMask(const std::string& gfx_name, const std::string& 
col_name)
+CollisionMask::CollisionMask(const std::string& gfx_name, const std::string& 
col_name) :
+  surface(),
+  buffer(),
+  width(),
+  height()
 {
   surface = Resource::load_surface(gfx_name);
   init_colmap(Resource::load_surface(col_name), col_name);
 }
 
-CollisionMask::CollisionMask(const std::string& name)
+CollisionMask::CollisionMask(const std::string& name) :
+  surface(),
+  buffer(),
+  width(),
+  height()
 {
   surface = Resource::load_surface(name);
   init_colmap(surface, name);
 }
 
-CollisionMask::CollisionMask(const ResDescriptor& res_desc)
-  : buffer(0)
+CollisionMask::CollisionMask(const ResDescriptor& res_desc) :
+  surface(),
+  buffer(),
+  width(),
+  height()
 {
   surface = Resource::load_surface(res_desc);
   init_colmap(surface, res_desc.res_name);

Modified: trunk/pingus/src/pingus/collision_mask.hpp
===================================================================
--- trunk/pingus/src/pingus/collision_mask.hpp  2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/collision_mask.hpp  2009-11-04 14:07:13 UTC (rev 
4020)
@@ -45,6 +45,10 @@
 
 private:
   void init_colmap(const Surface& surf, const std::string& surface_res);
+
+private:
+  CollisionMask(const CollisionMask&);
+  CollisionMask & operator=(const CollisionMask&);
 };
 
 #endif

Modified: trunk/pingus/src/pingus/config_manager.cpp
===================================================================
--- trunk/pingus/src/pingus/config_manager.cpp  2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/config_manager.cpp  2009-11-04 14:07:13 UTC (rev 
4020)
@@ -33,7 +33,19 @@
 
 ConfigManager config_manager;
 
-ConfigManager::ConfigManager()
+ConfigManager::ConfigManager() :
+  on_master_volume_change(),
+  on_sound_volume_change(),
+  on_music_volume_change(),
+  on_resolution_change(),
+  on_fullscreen_change(),
+  on_allow_resize_change(),
+  on_mouse_grab_change(),
+  on_print_fps_change(),
+  on_language_change(),
+  on_swcursor_change(),
+  on_autoscroll_change(),
+  filename()
 {
 }
 

Modified: trunk/pingus/src/pingus/credits.cpp
===================================================================
--- trunk/pingus/src/pingus/credits.cpp 2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/pingus/credits.cpp 2009-11-04 14:07:13 UTC (rev 4020)
@@ -54,12 +54,24 @@
     parent->on_escape_press();
     Sound::PingusSound::play_sound("yipee");
   }
+
+private:
+  CreditsOkButton(const CreditsOkButton&);
+  CreditsOkButton & operator=(const CreditsOkButton&);
 };
 
-Credits::Credits()
-  : background("core/menu/wood"),
-    blackboard("core/menu/blackboard"),
-    pingu("core/misc/creditpingu")
+Credits::Credits() :
+  scene_context(),
+  fast_scrolling(false),
+  background("core/menu/wood"),
+  blackboard("core/menu/blackboard"),
+  pingu("core/misc/creditpingu"),
+  font(),
+  font_small(),
+  is_init(),
+  end_offset(),
+  offset(),
+  credits()
 {
   scene_context = new SceneContext();
   fast_scrolling = false;
@@ -209,23 +221,23 @@
 
   end_offset = -(float)Display::get_height()/2 - 50; // screen height + grace 
time
   for (std::vector<std::string>::iterator i = credits.begin(); i != 
credits.end(); ++i)
+  {
+    switch ((*i)[0])
     {
-      switch ((*i)[0])
-       {
-       case '-':
-         end_offset += font.get_height() + 5;
-         break;
-       case '_':
-         end_offset += font_small.get_height() + 5;
-         break;
-       case 'n':
-         end_offset += 50;
-         break;
-       default:
-         std::cout << "Credits: Syntax error: Unknown format: '" << (*i)[0] << 
"'" << std::endl;
-         break;
-       }
+      case '-':
+        end_offset += font.get_height() + 5;
+        break;
+      case '_':
+        end_offset += font_small.get_height() + 5;
+        break;
+      case 'n':
+        end_offset += 50;
+        break;
+      default:
+        std::cout << "Credits: Syntax error: Unknown format: '" << (*i)[0] << 
"'" << std::endl;
+        break;
     }
+  }
   end_offset = -end_offset;
 }
 

Modified: trunk/pingus/src/pingus/demo_session.cpp
===================================================================
--- trunk/pingus/src/pingus/demo_session.cpp    2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/demo_session.cpp    2009-11-04 14:07:13 UTC (rev 
4020)
@@ -72,10 +72,19 @@
   }
 };
 
-DemoSession::DemoSession(const Pathname& pathname_)
-  : pathname(pathname_),
-    pause(false),
-    fast_forward(false)
+DemoSession::DemoSession(const Pathname& pathname_) :
+  pathname(pathname_),
+  server(),
+  demo(),
+  events(),
+  pcounter(),
+  playfield(),
+  small_map(),
+  fastforward_button(),
+  pause_button(),
+  restart_button(),
+  pause(false),
+  fast_forward(false)
 {
   // Load Demo file
   demo = std::auto_ptr<PingusDemo>(new PingusDemo(pathname));

Modified: trunk/pingus/src/pingus/direction.cpp
===================================================================
--- trunk/pingus/src/pingus/direction.cpp       2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/direction.cpp       2009-11-04 14:07:13 UTC (rev 
4020)
@@ -21,9 +21,9 @@
 {
 }
 
-Direction::Direction(const Direction& dir)
+Direction::Direction(const Direction& dir) :
+  direction(dir.direction)
 {
-  direction = dir.direction;
 }
 
 Direction::~Direction()

Modified: trunk/pingus/src/pingus/font.cpp
===================================================================
--- trunk/pingus/src/pingus/font.cpp    2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/pingus/font.cpp    2009-11-04 14:07:13 UTC (rev 4020)
@@ -38,9 +38,13 @@
   float  vertical_spacing;
   int    size;
   
-  FontImpl(const FontDescription& desc)
-    : char_spacing(desc.char_spacing),
-      size(desc.size)
+  FontImpl(const FontDescription& desc) :
+    framebuffer_surfaces(),
+    glyphs(),
+    space_length(),
+    char_spacing(desc.char_spacing),
+    vertical_spacing(),
+    size(desc.size)
   {
     vertical_spacing = size * desc.vertical_spacing;
    
@@ -176,12 +180,13 @@
   }
 };
 
-Font::Font()
+Font::Font() :
+  impl()
 {
 }
 
-Font::Font(const FontDescription& desc)
-  : impl(new FontImpl(desc))
+Font::Font(const FontDescription& desc) :
+  impl(new FontImpl(desc))
 {
 }
 

Modified: trunk/pingus/src/pingus/font_description.cpp
===================================================================
--- trunk/pingus/src/pingus/font_description.cpp        2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/pingus/font_description.cpp        2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -18,15 +18,22 @@
 #include "util/file_reader.hpp"
 #include "pingus/font_description.hpp"
 
-GlyphDescription::GlyphDescription()
-  : image(0), unicode(0), advance(0)
-{
-  
+GlyphDescription::GlyphDescription() :
+  image(0), 
+  unicode(0), 
+  offset(),
+  advance(0),
+  rect()
+{  
 }
 
-GlyphDescription::GlyphDescription(FileReader& reader)
+GlyphDescription::GlyphDescription(FileReader& reader) :
+  image(0), 
+  unicode(0), 
+  offset(),
+  advance(0),
+  rect()
 {
-  image = 0;
   int lazy = 0; // FIXME: implement read_uint32
   reader.read_int("unicode", lazy);
   unicode = lazy;
@@ -35,8 +42,12 @@
   reader.read_rect("rect",   rect);
 }
 
-FontDescription::FontDescription(const Pathname& pathname_)
-  : pathname(pathname_)
+FontDescription::FontDescription(const Pathname& pathname_) :
+  pathname(pathname_),
+  char_spacing(),
+  vertical_spacing(),
+  size(),
+  images()
 {
   char_spacing     = 1.0f;
   vertical_spacing = 1.0f;

Modified: trunk/pingus/src/pingus/font_description.hpp
===================================================================
--- trunk/pingus/src/pingus/font_description.hpp        2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/pingus/font_description.hpp        2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -45,6 +45,11 @@
 
   /** Characters in the font image */
   std::vector<GlyphDescription> glyphs;
+
+  GlyphImageDescription() :
+    pathname(),
+    glyphs()
+  {}
 };
 
 /** */

Modified: trunk/pingus/src/pingus/font_test_screen.cpp
===================================================================
--- trunk/pingus/src/pingus/font_test_screen.cpp        2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/pingus/font_test_screen.cpp        2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -24,9 +24,12 @@
 #include "pingus/font_description.hpp"
 #include "pingus/font_test_screen.hpp"
 
-FontTestScreen::FontTestScreen(const Pathname& fontfile)
-  : Screen(Display::get_size()),
-    dark(true)
+FontTestScreen::FontTestScreen(const Pathname& fontfile) :
+  Screen(Display::get_size()),
+  font(),
+  reference(),
+  scroll(),
+  dark(true)
 {
   std::cout << "### Loading font file: " << fontfile << std::endl;
   font = Font(FontDescription(fontfile));

Modified: trunk/pingus/src/pingus/font_test_screen.hpp
===================================================================
--- trunk/pingus/src/pingus/font_test_screen.hpp        2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/pingus/font_test_screen.hpp        2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -28,6 +28,7 @@
   Font reference;
   Vector2i scroll;
   bool  dark;
+
 public:
   FontTestScreen(const Pathname& fontfile);
 

Modified: trunk/pingus/src/pingus/fps_counter.cpp
===================================================================
--- trunk/pingus/src/pingus/fps_counter.cpp     2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/fps_counter.cpp     2009-11-04 14:07:13 UTC (rev 
4020)
@@ -22,7 +22,11 @@
 
 FPSCounter fps_counter;
 
-FPSCounter::FPSCounter()
+FPSCounter::FPSCounter() :
+  odd_frame(),
+  fps_string(),
+  fps_count(),
+  start_time()
 {
   start_time = SDL_GetTicks();
   fps_count = 0;

Modified: trunk/pingus/src/pingus/game_session.cpp
===================================================================
--- trunk/pingus/src/pingus/game_session.cpp    2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/game_session.cpp    2009-11-04 14:07:13 UTC (rev 
4020)
@@ -37,17 +37,18 @@
 #include "pingus/globals.hpp"
 #include "pingus/debug.hpp"
 
-GameSession::GameSession (const PingusLevel& arg_plf, bool 
arg_show_result_screen)
-  : plf(arg_plf),
-    show_result_screen(arg_show_result_screen),
-    is_finished  (false),
-    button_panel (0),
-    pcounter     (0),
-    playfield    (0),
-    time_display (0),
-    small_map    (0),
-    pause(false),
-    fast_forward(false)
+GameSession::GameSession (const PingusLevel& arg_plf, bool 
arg_show_result_screen) :
+  plf(arg_plf),
+  show_result_screen(arg_show_result_screen),
+  server(),
+  is_finished  (false),
+  button_panel (0),
+  pcounter     (0),
+  playfield    (0),
+  time_display (0),
+  small_map    (0),
+  pause(false),
+  fast_forward(false)
 {
   server = std::auto_ptr<Server>(new Server(plf, true));
 

Modified: trunk/pingus/src/pingus/graphic_context_state.cpp
===================================================================
--- trunk/pingus/src/pingus/graphic_context_state.cpp   2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/pingus/graphic_context_state.cpp   2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -26,6 +26,13 @@
 
   bool have_limit;
   Rect limit;
+
+  GraphicContextStateImpl() :
+    rect(),
+    offset(),
+    have_limit(),
+    limit()
+  {}
 };
 
 GraphicContextState::GraphicContextState()

Modified: trunk/pingus/src/pingus/ground_map.cpp
===================================================================
--- trunk/pingus/src/pingus/ground_map.cpp      2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/ground_map.cpp      2009-11-04 14:07:13 UTC (rev 
4020)
@@ -87,8 +87,8 @@
     }
 }
 
-GroundMap::GroundMap(int width_, int height_)
-  : width(width_), height(height_)
+GroundMap::GroundMap(int width_, int height_) :
+  width(width_), height(height_)
 {
   colmap = new CollisionMap(width, height);
 

Modified: trunk/pingus/src/pingus/layer_manager.cpp
===================================================================
--- trunk/pingus/src/pingus/layer_manager.cpp   2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/layer_manager.cpp   2009-11-04 14:07:13 UTC (rev 
4020)
@@ -18,8 +18,8 @@
 
 #include "pingus/layer_manager.hpp"
 
-
-LayerManager::LayerManager ()
+LayerManager::LayerManager () :
+  layers()
 {
 }
 

Modified: trunk/pingus/src/pingus/layer_manager.hpp
===================================================================
--- trunk/pingus/src/pingus/layer_manager.hpp   2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/layer_manager.hpp   2009-11-04 14:07:13 UTC (rev 
4020)
@@ -42,17 +42,18 @@
     float y_offset;
 
   public:
-    Layer ()
-      : x_pos(0), y_pos(0),
-        x_update(0), y_update(0),
-        x_offset(0), y_offset(0)
+    Layer () :
+      sur(),
+      x_pos(0), y_pos(0),
+      x_update(0), y_update(0),
+      x_offset(0), y_offset(0)
     {}
 
-    Layer (const Sprite& arg_sur, float x_o, float y_o, float x_u, float y_u)
-      : sur(arg_sur),
-        x_pos(0), y_pos(0),
-        x_update(x_u), y_update(y_u),
-        x_offset(x_o), y_offset(y_o)
+    Layer (const Sprite& arg_sur, float x_o, float y_o, float x_u, float y_u) :
+      sur(arg_sur),
+      x_pos(0), y_pos(0),
+      x_update(x_u), y_update(y_u),
+      x_offset(x_o), y_offset(y_o)
     {}
 
     void draw (DrawingContext& gc)

Modified: trunk/pingus/src/pingus/level_menu.cpp
===================================================================
--- trunk/pingus/src/pingus/level_menu.cpp      2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/level_menu.cpp      2009-11-04 14:07:13 UTC (rev 
4020)
@@ -34,8 +34,7 @@
 #include "gui/surface_button.hpp"
 #include "sound/sound.hpp"
 
-class LevelMenuAbortButton
-  : public GUI::SurfaceButton
+class LevelMenuAbortButton : public GUI::SurfaceButton
 {
 private:
   LevelMenu* parent;
@@ -64,10 +63,13 @@
     SurfaceButton::on_pointer_enter();
     Sound::PingusSound::play_sound ("tick");
   }
+
+private:
+  LevelMenuAbortButton(const LevelMenuAbortButton&);
+  LevelMenuAbortButton & operator=(const LevelMenuAbortButton&);
 };
 
-class LevelScrollButton
-  : public GUI::SurfaceButton
+class LevelScrollButton : public GUI::SurfaceButton
 {
 private:
   boost::function<void(void)> callback;
@@ -91,6 +93,10 @@
     SurfaceButton::on_pointer_enter();
     Sound::PingusSound::play_sound("tick");
   }
+
+private:
+  LevelScrollButton(const LevelScrollButton&);
+  LevelScrollButton & operator=(const LevelScrollButton&);
 };
 
 class LevelsetSelector : public GUI::RectComponent
@@ -212,6 +218,10 @@
   }
 
   void update_layout() {}
+
+private:
+  LevelsetSelector(const LevelsetSelector&);
+  LevelsetSelector & operator=(const LevelsetSelector&);
 };
 
 class LevelSelector : public GUI::RectComponent
@@ -336,13 +346,17 @@
   }
 
   void update_layout() {}
+
+private:
+  LevelSelector(const LevelSelector&);
+  LevelSelector & operator=(const LevelSelector&);
 };
 
-LevelMenu::LevelMenu()
-  : x_pos((Display::get_width()  - default_screen_width)/2),
-    y_pos((Display::get_height() - default_screen_height)/2),
-    background("core/menu/wood"),
-    blackboard("core/menu/blackboard")
+LevelMenu::LevelMenu() :
+  x_pos((Display::get_width()  - default_screen_width)/2),
+  y_pos((Display::get_height() - default_screen_height)/2),
+  background("core/menu/wood"),
+  blackboard("core/menu/blackboard")
 {
   ok_button  = Sprite("core/start/ok");
 

Modified: trunk/pingus/src/pingus/levelset.cpp
===================================================================
--- trunk/pingus/src/pingus/levelset.cpp        2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/levelset.cpp        2009-11-04 14:07:13 UTC (rev 
4020)
@@ -23,47 +23,51 @@
 #include "pingus/resource.hpp"
 #include "math/math.hpp"
 
-Levelset::Levelset(const Pathname& pathname)
-  : completion(0)
+Levelset::Levelset(const Pathname& pathname) :
+  title(),
+  description(),
+  image(),
+  completion(0),
+  levels()
 {
   FileReader reader = FileReader::parse(pathname);
   if (reader.get_name() != "pingus-levelset")
-    {
-      PingusError::raise("Error: " + pathname.str() + ": not a 
'pingus-levelset' file");
-    }
+  {
+    PingusError::raise("Error: " + pathname.str() + ": not a 'pingus-levelset' 
file");
+  }
   else
+  {
+    reader.read_string("title",       title);
+    reader.read_string("description", description);
+    std::string image_str;
+    if (reader.read_string("image", image_str))
+      this->image = Sprite(image_str);
+
+    FileReader level_reader = reader.read_section("levels");
+    std::vector<FileReader> sections = level_reader.get_sections();
+    for(std::vector<FileReader>::iterator i = sections.begin(); i != 
sections.end(); ++i)
     {
-      reader.read_string("title",       title);
-      reader.read_string("description", description);
-      std::string image_str;
-      if (reader.read_string("image", image_str))
-        this->image = Sprite(image_str);
+      if (i->get_name() == "level")
+      {
+        Level* level = new Level();
 
-      FileReader level_reader = reader.read_section("levels");
-      std::vector<FileReader> sections = level_reader.get_sections();
-      for(std::vector<FileReader>::iterator i = sections.begin(); i != 
sections.end(); ++i)
+        if (i->read_string("filename", level->resname))
         {
-          if (i->get_name() == "level")
-            {
-              Level* level = new Level();
-
-              if (i->read_string("filename", level->resname))
-                {
-                  level->plf        = PLFResMgr::load_plf(level->resname);
+          level->plf        = PLFResMgr::load_plf(level->resname);
                   
-                  level->accessible = false;
-                  level->finished   = false;
+          level->accessible = false;
+          level->finished   = false;
                       
-                  levels.push_back(level);
-                }
-              else
-                {
-                  std::cout << "Levelset: " << pathname.str() << " is missing 
filename tag" << std::endl;
-                  delete level;
-                }
-            }
+          levels.push_back(level);
         }
+        else
+        {
+          std::cout << "Levelset: " << pathname.str() << " is missing filename 
tag" << std::endl;
+          delete level;
+        }
+      }
     }
+  }
 
   refresh();
 }

Modified: trunk/pingus/src/pingus/levelset.hpp
===================================================================
--- trunk/pingus/src/pingus/levelset.hpp        2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/levelset.hpp        2009-11-04 14:07:13 UTC (rev 
4020)
@@ -27,11 +27,19 @@
 class Levelset
 {
 public:
-  struct Level {
+  struct Level 
+  {
     std::string resname;
     bool accessible;
     bool finished;
     PingusLevel plf;
+
+    Level() :
+      resname(),
+      accessible(),
+      finished(),
+      plf()
+    {}
   };
 
 private:

Modified: trunk/pingus/src/pingus/mover.cpp
===================================================================
--- trunk/pingus/src/pingus/mover.cpp   2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/pingus/mover.cpp   2009-11-04 14:07:13 UTC (rev 4020)
@@ -16,7 +16,6 @@
 
 #include "pingus/mover.hpp"
 
-
 Mover::Mover(World* const world_arg, const Vector3f& pos_arg)
   : world(world_arg),
     pos(pos_arg),
@@ -44,5 +43,4 @@
   return collision;
 }
 
-
 /* EOF */

Modified: trunk/pingus/src/pingus/mover.hpp
===================================================================
--- trunk/pingus/src/pingus/mover.hpp   2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/pingus/mover.hpp   2009-11-04 14:07:13 UTC (rev 4020)
@@ -24,40 +24,43 @@
 
 class Mover
 {
-  public:
-    /** Constructor of abstract class */
-    Mover(World* const world_arg, const Vector3f& pos_arg);
+public:
+  /** Constructor of abstract class */
+  Mover(World* const world_arg, const Vector3f& pos_arg);
 
-    /** Destructor of abstract class */
-    virtual ~Mover() = 0;
+  /** Destructor of abstract class */
+  virtual ~Mover() = 0;
 
-    /** Updates the position of the object taking into account collisions */
-    virtual void update(const Vector3f& move, const Collider& collider) = 0;
+  /** Updates the position of the object taking into account collisions */
+  virtual void update(const Vector3f& move, const Collider& collider) = 0;
 
-    /** Get the resulting position vector */
-    Vector3f get_pos() const;
+  /** Get the resulting position vector */
+  Vector3f get_pos() const;
 
-    /** Get the move vector remaining after a collision */
-    Vector3f remaining() const;
+  /** Get the move vector remaining after a collision */
+  Vector3f remaining() const;
 
-    /** Get whether object stopped moving because it collided with something */
-    bool collided() const;
+  /** Get whether object stopped moving because it collided with something */
+  bool collided() const;
 
-  protected:
-    /** World in which the object should move */
-    World* const world;
+protected:
+  /** World in which the object should move */
+  World* const world;
 
-    /** Position of the object to move */
-    Vector3f pos;
+  /** Position of the object to move */
+  Vector3f pos;
 
-    /** Move vector remaining after a collision */
-    Vector3f remaining_move;
+  /** Move vector remaining after a collision */
+  Vector3f remaining_move;
 
-    /** Flag to denote whether object has had a collision */
-    bool collision;
+  /** Flag to denote whether object has had a collision */
+  bool collision;
+
+private:
+  Mover(const Mover&);
+  Mover & operator=(const Mover&);
 };
 
-
 #endif
 
 /* EOF */

Modified: trunk/pingus/src/pingus/path_manager.cpp
===================================================================
--- trunk/pingus/src/pingus/path_manager.cpp    2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/path_manager.cpp    2009-11-04 14:07:13 UTC (rev 
4020)
@@ -22,8 +22,10 @@
 
 PathManager path_manager;
 
-PathManager::PathManager ()
-  : path_found (false)
+PathManager::PathManager () :
+  path_list(),
+  path_found (false),
+  base_path()
 {
 }
 

Modified: trunk/pingus/src/pingus/result.hpp
===================================================================
--- trunk/pingus/src/pingus/result.hpp  2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/pingus/result.hpp  2009-11-04 14:07:13 UTC (rev 4020)
@@ -45,6 +45,16 @@
   /** Number of Pingus needed to save */
   int needed;
 
+  Result() :
+    plf(),
+    saved(),
+    killed(),
+    total(),
+    used_time(),
+    max_time(),
+    needed()
+  {}
+
   bool success() {
     return (saved >= needed);
   }

Modified: trunk/pingus/src/pingus/worldobj.hpp
===================================================================
--- trunk/pingus/src/pingus/worldobj.hpp        2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/pingus/worldobj.hpp        2009-11-04 14:07:13 UTC (rev 
4020)
@@ -53,7 +53,7 @@
   WorldObj ();
   WorldObj(const FileReader& reader);
 
-  WorldObj (const WorldObj&)       { }
+  WorldObj (const WorldObj&) : id() {}
   WorldObj& operator= (const WorldObj&) { return *this; }
 
   /** Destroys a world object */

Modified: trunk/pingus/src/util/command_line.cpp
===================================================================
--- trunk/pingus/src/util/command_line.cpp      2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/util/command_line.cpp      2009-11-04 14:07:13 UTC (rev 
4020)
@@ -30,9 +30,9 @@
 #include "util/command_line.hpp"
 #include "util/command_line_generic.hpp"
 
-CommandLine::CommandLine()
+CommandLine::CommandLine() :
+  impl(new CommandLine_Generic())
 {
-       impl = new CommandLine_Generic();
 }
 
 CommandLine::~CommandLine()

Modified: trunk/pingus/src/util/command_line.hpp
===================================================================
--- trunk/pingus/src/util/command_line.hpp      2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/util/command_line.hpp      2009-11-04 14:07:13 UTC (rev 
4020)
@@ -152,6 +152,10 @@
 //! Implementation:
 private:
        CommandLine_Generic* impl;
+
+private:
+  CommandLine(const CommandLine&);
+  CommandLine & operator=(const CommandLine&);
 };
 
 #endif

Modified: trunk/pingus/src/util/command_line_generic.cpp
===================================================================
--- trunk/pingus/src/util/command_line_generic.cpp      2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/util/command_line_generic.cpp      2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -39,9 +39,13 @@
 #define snprintf _snprintf
 #endif
 
-CommandLine_Generic::CommandLine_Generic()
-{
-  help_indent = 18;
+CommandLine_Generic::CommandLine_Generic() :
+  help_indent(18),
+  programm(),
+  options(),
+  parsed_options(),
+  current_option()
+{  
 }
 
 void CommandLine_Generic::parse_args(int argc, char** argv)

Modified: trunk/pingus/src/util/command_line_generic.hpp
===================================================================
--- trunk/pingus/src/util/command_line_generic.hpp      2009-11-04 06:25:33 UTC 
(rev 4019)
+++ trunk/pingus/src/util/command_line_generic.hpp      2009-11-04 14:07:13 UTC 
(rev 4020)
@@ -52,6 +52,14 @@
                std::string long_option;
                std::string argument;
                bool visible;
+
+          Option() :
+            key(),
+            help(),
+            long_option(),
+            argument(),
+            visible()
+          {}
        };
   
        typedef std::vector<Option> Options;
@@ -61,6 +69,10 @@
        {
                int key;
                std::string argument;
+          ParsedOption() :
+            key(),
+            argument()
+          {}
        };
 
        typedef std::vector<ParsedOption> ParsedOptions;

Modified: trunk/pingus/src/util/debug_stream.cpp
===================================================================
--- trunk/pingus/src/util/debug_stream.cpp      2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/util/debug_stream.cpp      2009-11-04 14:07:13 UTC (rev 
4020)
@@ -22,8 +22,10 @@
 
 NilStream DebugStream::nilstream;
 
-DebugStream::Buffer::Buffer (const std::string& p)
-  : prefix (p)
+DebugStream::Buffer::Buffer (const std::string& p) :
+  out_streams(),
+  char_buffer(),
+  prefix (p)
 {
   // Set the output buffer
   setp (char_buffer, char_buffer + buffersize - 1);
@@ -150,8 +152,9 @@
 }
 
 
-NilStream::NilStream ()
-  : ostream(&buffer)
+NilStream::NilStream() :
+  ostream(&buffer),
+  buffer()
 {
 }
 

Modified: trunk/pingus/src/util/file_reader.cpp
===================================================================
--- trunk/pingus/src/util/file_reader.cpp       2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/util/file_reader.cpp       2009-11-04 14:07:13 UTC (rev 
4020)
@@ -21,12 +21,13 @@
 #include "util/file_reader.hpp"
 #include "util/file_reader_impl.hpp"
 
-FileReader::FileReader(boost::shared_ptr<FileReaderImpl> impl_)
-  : impl(impl_)
+FileReader::FileReader(boost::shared_ptr<FileReaderImpl> impl_) :
+  impl(impl_)
 {
 }
 
-FileReader::FileReader()
+FileReader::FileReader() :
+  impl()
 {
 }
 

Modified: trunk/pingus/src/util/file_reader.hpp
===================================================================
--- trunk/pingus/src/util/file_reader.hpp       2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/util/file_reader.hpp       2009-11-04 14:07:13 UTC (rev 
4020)
@@ -38,6 +38,7 @@
 public:
   FileReader(boost::shared_ptr<FileReaderImpl> impl_);
   FileReader();
+  virtual ~FileReader() {}
 
   /** Name of the current section, ie. in the case of
       <groundpiece><pos>...</groundpiece> it would be 'groundpiece' */

Modified: trunk/pingus/src/util/memory_pool.hpp
===================================================================
--- trunk/pingus/src/util/memory_pool.hpp       2009-11-04 06:25:33 UTC (rev 
4019)
+++ trunk/pingus/src/util/memory_pool.hpp       2009-11-04 14:07:13 UTC (rev 
4020)
@@ -60,12 +60,12 @@
   }
 
 public:
-  MemoryPool(size_t chunk_size_ = 16384)
-    : chunk_size(chunk_size_),
-      next_free(0)
-  {
-    
-  }
+  MemoryPool(size_t chunk_size_ = 16384) :
+    objects(),
+    chunks(),
+    chunk_size(chunk_size_),
+    next_free(0)
+  {}
 
   ~MemoryPool() 
   {

Modified: trunk/pingus/src/util/pathname.cpp
===================================================================
--- trunk/pingus/src/util/pathname.cpp  2009-11-04 06:25:33 UTC (rev 4019)
+++ trunk/pingus/src/util/pathname.cpp  2009-11-04 14:07:13 UTC (rev 4020)
@@ -26,8 +26,9 @@
   return Pathname();
 }
 
-Pathname::Pathname()
- : type(INVALID)
+Pathname::Pathname() :
+  pathname(),
+  type(INVALID)
 {
 }
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]