pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r3710 - trunk/pingus/src/components


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3710 - trunk/pingus/src/components
Date: Mon, 7 Jul 2008 10:22:19 +0200

Author: grumbel
Date: 2008-07-07 10:22:18 +0200 (Mon, 07 Jul 2008)
New Revision: 3710

Modified:
   trunk/pingus/src/components/smallmap.cpp
   trunk/pingus/src/components/smallmap.hpp
Log:
Used auto_ptr

Modified: trunk/pingus/src/components/smallmap.cpp
===================================================================
--- trunk/pingus/src/components/smallmap.cpp    2008-07-07 08:21:56 UTC (rev 
3709)
+++ trunk/pingus/src/components/smallmap.cpp    2008-07-07 08:22:18 UTC (rev 
3710)
@@ -62,14 +62,13 @@
   x_pos   = 5;
   y_pos   = Display::get_height() - height - 5;
 
-  image = new SmallMapImage(server, width, height);
+  image = std::auto_ptr<SmallMapImage>(new SmallMapImage(server, width, 
height));
 
   scroll_mode = false;
 }
 
 SmallMap::~SmallMap()
 {
-  delete image;
 }
 
 void

Modified: trunk/pingus/src/components/smallmap.hpp
===================================================================
--- trunk/pingus/src/components/smallmap.hpp    2008-07-07 08:21:56 UTC (rev 
3709)
+++ trunk/pingus/src/components/smallmap.hpp    2008-07-07 08:22:18 UTC (rev 
3710)
@@ -24,7 +24,7 @@
 class Server;
 class Vector3f;
 class SmallMapImage;
-
+
 /** This is the map that appears in the corner of the screen */
 class SmallMap : public GUI::Component
 {
@@ -38,7 +38,7 @@
   /** Graphic surface of the entrance */
   Sprite entrance_sur;
 
-  SmallMapImage* image;
+  std::auto_ptr<SmallMapImage> image;
 
   /** Horizontal position of the small map */
   int x_pos;
@@ -91,8 +91,7 @@
   SmallMap (const SmallMap&);
   SmallMap& operator= (const SmallMap&);
 };
-
-
+
 #endif
 
 /* EOF */





reply via email to

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