mail[Wesnoth-commits] r43857 - /trunk/src/ai/manager.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on July 03, 2010 - 12:59:
Author: mordante
Date: Sat Jul  3 12:59:00 2010
New Revision: 43857

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43857&view=rev
Log:
Remove NULL check before deleting a pointer.

Issue found by cppcheck.

Modified:
    trunk/src/ai/manager.cpp

Modified: trunk/src/ai/manager.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/manager.cpp?rev=43857&r1=43856&r2=43857&view=diff
==============================================================================
--- trunk/src/ai/manager.cpp (original)
+++ trunk/src/ai/manager.cpp Sat Jul  3 12:59:00 2010
@@ -300,10 +300,8 @@
 
 
 void manager::clear_ai_info(){
-       if (ai_info_ != NULL){
-               delete ai_info_;
-               ai_info_ = NULL;
-       }
+       delete ai_info_;
+       ai_info_ = NULL;
 }
 
 




Related Messages


Powered by MHonArc, Updated Sat Jul 03 13:00:06 2010