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);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits