Author: silene
Date: Sun Apr 12 16:13:38 2009
New Revision: 34783
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34783&view=rev
Log:
Removed config::const_child_iterator default constructor and
unit_type_data::unit_type_map_wrapper copy constructor.
Modified:
trunk/src/config.hpp
trunk/src/unit_types.cpp
trunk/src/unit_types.hpp
Modified: trunk/src/config.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/config.hpp?rev=34783&r1=34782&r2=34783&view=diff
==============================================================================
--- trunk/src/config.hpp (original)
+++ trunk/src/config.hpp Sun Apr 12 16:13:38 2009
@@ -133,7 +133,6 @@
typedef const config &reference;
typedef child_list::const_iterator Itor;
explicit const_child_iterator(const Itor &i): i_(i) {}
- const_child_iterator() {}
const_child_iterator(const child_iterator &i): i_(i.i_) {}
const_child_iterator &operator++() { ++i_; return *this; }
Modified: trunk/src/unit_types.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.cpp?rev=34783&r1=34782&r2=34783&view=diff
==============================================================================
--- trunk/src/unit_types.cpp (original)
+++ trunk/src/unit_types.cpp Sun Apr 12 16:13:38 2009
@@ -1108,7 +1108,6 @@
dummy_unit_map_(),
movement_types_(),
races_(),
- unit_traits_(),
unit_cfg_(NULL)
{
dummy_unit_map_.insert(std::pair<const
std::string,unit_type>("dummy_unit", unit_type()));
@@ -1120,7 +1119,6 @@
clear();
set_unit_config(cfg);
- set_unit_traits(cfg.child_range("trait"));
foreach (const config &mt, cfg.child_range("movetype"))
{
@@ -1251,12 +1249,12 @@
switch (status){
case unit_type::CREATED:
ut->second.set_config(unit_cfg);
- ut->second.build_created(unit_cfg, movement_types_, races_,
unit_traits_);
+ ut->second.build_created(unit_cfg, movement_types_,
races_, unit_cfg_->child_range("trait"));
break;
case unit_type::HELP_INDEX:
//build the stuff that is needed to feed the help index
if ( (ut->second.build_status() == unit_type::NOT_BUILT) ||
(ut->second.build_status() == unit_type::CREATED) )
- ut->second.build_help_index(unit_cfg, movement_types_, races_,
unit_traits_);
+ ut->second.build_help_index(unit_cfg,
movement_types_, races_, unit_cfg_->child_range("trait"));
add_advancefrom(unit_cfg);
break;
@@ -1266,7 +1264,7 @@
(ut->second.build_status() == unit_type::CREATED) ||
(ut->second.build_status() == unit_type::HELP_INDEX) )
{
- ut->second.build_full(unit_cfg, movement_types_, races_,
unit_traits_);
+ ut->second.build_full(unit_cfg,
movement_types_, races_, unit_cfg_->child_range("trait"));
if ( (ut->second.build_status() == unit_type::NOT_BUILT) ||
(ut->second.build_status() == unit_type::CREATED) )
Modified: trunk/src/unit_types.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.hpp?rev=34783&r1=34782&r2=34783&view=diff
==============================================================================
--- trunk/src/unit_types.hpp (original)
+++ trunk/src/unit_types.hpp Sun Apr 12 16:13:38 2009
@@ -360,18 +360,9 @@
private:
unit_type_map_wrapper();
- unit_type_map_wrapper(unit_type_map_wrapper& /*utf*/) :
- types_(),
- dummy_unit_map_(),
- movement_types_(),
- races_(),
- unit_traits_(),
- unit_cfg_(0)
- {}
+ unit_type_map_wrapper(const unit_type_map_wrapper &);
void set_unit_config(const config& unit_cfg) { unit_cfg_ =
&unit_cfg; }
- void set_unit_traits(const config::const_child_itors
&unit_traits)
- { unit_traits_ = unit_traits; }
const config& find_config(const std::string& key) const;
std::pair<unit_type_map::iterator, bool> insert(const
std::pair<std::string,unit_type>& utype) { return types_.insert(utype); }
@@ -389,7 +380,6 @@
mutable unit_type_map dummy_unit_map_;
movement_type_map movement_types_;
race_map races_;
- config::const_child_itors unit_traits_;
const config* unit_cfg_;
};
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits