mail[Wesnoth-commits] r28470 - /trunk/src/variable.cpp


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

Header


Content

Posted by koraq on August 12, 2008 - 02:14:
Author: mordante
Date: Mon Aug 11 19:50:49 2008
New Revision: 28470

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28470&view=rev
Log:
Added constructor to initialize all members and initialize all members.

Modified:
    trunk/src/variable.cpp

Modified: trunk/src/variable.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/variable.cpp?rev=28470&r1=28469&r2=28470&view=diff
==============================================================================
--- trunk/src/variable.cpp (original)
+++ trunk/src/variable.cpp Mon Aug 11 19:50:49 2008
@@ -62,6 +62,11 @@
 
        class hash_memory_manager {
        public:
+               hash_memory_manager() :
+                       mem_()
+               {
+               }
+
                const std::string *find(const std::string& str) const {
                        std::set<std::string const*, 
compare_str_ptr>::const_iterator itor = mem_.lower_bound(&str);
                        if(itor == mem_.end() || **itor != str) {
@@ -443,8 +448,10 @@
        }
 }
 
-scoped_wml_variable::scoped_wml_variable(const std::string& var_name)
-       : var_name_(var_name), activated_(false)
+scoped_wml_variable::scoped_wml_variable(const std::string& var_name) :
+       previous_val_(),
+       var_name_(var_name), 
+       activated_(false)
 {
        repos->scoped_variables.push_back(this);
 }
@@ -532,8 +539,14 @@
 }
 } // end anonymous namespace
 
-variable_info::variable_info(const std::string& varname, bool force_valid, 
TYPE validation_type)
-       : vartype(validation_type), is_valid(false), explicit_index(false), 
index(0), vars(NULL)
+variable_info::variable_info(const std::string& varname, 
+               bool force_valid, TYPE validation_type) :
+       vartype(validation_type), 
+       is_valid(false), 
+       key(),
+       explicit_index(false), 
+       index(0), 
+       vars(NULL)
 {
        assert(repos != NULL);
        activate_scope_variable(varname);




Related Messages


Powered by MHonArc, Updated Tue Aug 12 03:41:07 2008