[Orxonox-commit 3193] r7886 - code/trunk/src/modules/pong

landauf at orxonox.net landauf at orxonox.net
Mon Feb 14 15:31:53 CET 2011


Author: landauf
Date: 2011-02-14 15:31:53 +0100 (Mon, 14 Feb 2011)
New Revision: 7886

Modified:
   code/trunk/src/modules/pong/PongBall.cc
Log:
simplification

Modified: code/trunk/src/modules/pong/PongBall.cc
===================================================================
--- code/trunk/src/modules/pong/PongBall.cc	2011-02-14 14:27:56 UTC (rev 7885)
+++ code/trunk/src/modules/pong/PongBall.cc	2011-02-14 14:31:53 UTC (rev 7886)
@@ -189,12 +189,8 @@
     {
         if (!this->bat_)
         {
-            if (this->bDeleteBats_)
-                delete[] this->bat_;
-            else
-                this->bDeleteBats_ = true;
-
             this->bat_ = new WeakPtr<PongBat>[2];
+            this->bDeleteBats_ = true;
         }
 
         if (this->batID_[0] != OBJECTID_UNKNOWN)




More information about the Orxonox-commit mailing list