mail[Wesnoth-commits] r25146 - /trunk/src/unit_map.hpp


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

Header


Content

Posted by crazy-ivanovic on March 26, 2008 - 14:40:
Author: ivanovic
Date: Wed Mar 26 14:40:25 2008
New Revision: 25146

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25146&view=rev
Log:
fix compiler warning when using gcc 4.2.3 that was introduced with patch 
#1020 (fix by cjhopman)
warning was:
# mouse_events.cpp: In member function 'void 
events::mouse_handler::mouse_motion(int, int, bool, bool)':
# mouse_events.cpp:854: warning: 
'dest_un.unit_map::const_unit_iterator::counter.unit_map::iterator_counter::map_'
 may be used uninitialized in this function

Modified:
    trunk/src/unit_map.hpp

Modified: trunk/src/unit_map.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_map.hpp?rev=25146&r1=25145&r2=25146&view=diff
==============================================================================
--- trunk/src/unit_map.hpp (original)
+++ trunk/src/unit_map.hpp Wed Mar 26 14:40:25 2008
@@ -38,7 +38,7 @@
        
        //! Used so unit_map can keep a count of iterators and clean invalid 
pointers when no iterators exist. Every iterator and accessor has a counter 
instance.
        struct iterator_counter {
-                       iterator_counter() : has_map_(false) {}
+                       iterator_counter() : map_(NULL), has_map_(false) {}
                        iterator_counter(const unit_map* map) : map_(map), 
has_map_(true) 
                        { map_->add_iter(); }
                        




Related Messages


Powered by MHonArc, Updated Wed Mar 26 15:03:02 2008