mail[Wesnoth-commits] r20619 - /trunk/src/map.cpp


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

Header


Content

Posted by koraq on September 20, 2007 - 17:38:
Author: mordante
Date: Thu Sep 20 17:37:38 2007
New Revision: 20619

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20619&view=rev
Log:
Make sure all members are initialized in the constructor.

Modified:
    trunk/src/map.cpp

Modified: trunk/src/map.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map.cpp?rev=20619&r1=20618&r2=20619&view=diff
==============================================================================
--- trunk/src/map.cpp (original)
+++ trunk/src/map.cpp Thu Sep 20 17:37:38 2007
@@ -148,7 +148,9 @@
        }
 }
 
-gamemap::location::location(const config& cfg, const variable_set *variables)
+gamemap::location::location(const config& cfg, const variable_set 
*variables) :
+               x(-1000),
+               y(-1000)
 {
        std::string xs = cfg["x"], ys = cfg["y"];
        if (variables)
@@ -269,7 +271,14 @@
 }
 
 gamemap::gamemap(const config& cfg, const std::string& data) :
-               tiles_(1), w_(-1), h_(-1)
+               tiles_(1), 
+               terrainList_(),
+               letterToTerrain_(),
+               villages_(),
+               borderCache_(),
+               terrainFrequencyCache_(),
+               w_(-1), 
+               h_(-1)
 {
        LOG_G << "loading map: '" << data << "'\n";
        const config::child_list& terrains = cfg.get_children("terrain");




Related Messages


Powered by MHonArc, Updated Thu Sep 20 17:40:54 2007