Author: ai0867
Date: Tue Sep 16 20:41:55 2008
New Revision: 29494
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29494&view=rev
Log:
* Removed obsolete compatibility code.
Modified:
trunk/src/game_events.hpp
trunk/src/unit_animation.cpp
trunk/src/unit_types.cpp
Modified: trunk/src/game_events.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.hpp?rev=29494&r1=29493&r2=29494&view=diff
==============================================================================
--- trunk/src/game_events.hpp (original)
+++ trunk/src/game_events.hpp Tue Sep 16 20:41:55 2008
@@ -124,11 +124,7 @@
{
vconfig::child_list kids;
kids = cfg_.get_children("filter_attack");
- // FIXME OBSOLETE: remove in 1.5.3
- if (!kids.empty())
- return kids;
- else
- return
cfg_.get_children("special_filter");
+ return kids;
}
@@ -140,11 +136,7 @@
{
vconfig::child_list kids;
kids =
cfg_.get_children("filter_second_attack");
- // FIXME OBSOLETE: remove in 1.5.3
- if (!kids.empty())
- return kids;
- else
- return
cfg_.get_children("special_filter_second");
+ return kids;
}
bool handle_event(const queued_event& event_info,
Modified: trunk/src/unit_animation.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_animation.cpp?rev=29494&r1=29493&r2=29494&view=diff
==============================================================================
--- trunk/src/unit_animation.cpp (original)
+++ trunk/src/unit_animation.cpp Tue Sep 16 20:41:55 2008
@@ -220,15 +220,7 @@
for(itor = cfg.child_range("filter_attack").first; itor
<cfg.child_range("filter_attack").second;itor++) {
primary_attack_filter_.push_back(**itor);
}
- // FIXME OBSOLETE: Remove in 1.5,3
- for(itor = cfg.child_range("attack_filter").first; itor
<cfg.child_range("attack_filter").second;itor++) {
- primary_attack_filter_.push_back(**itor);
- }
for(itor = cfg.child_range("filter_second_attack").first; itor
<cfg.child_range("filter_second_attack").second;itor++) {
- secondary_attack_filter_.push_back(**itor);
- }
- // FIXME OBSOLETE: Remove in 1.5,3
- for(itor = cfg.child_range("secondary_attack_filter").first; itor
<cfg.child_range("secondary_attack_filter").second;itor++) {
secondary_attack_filter_.push_back(**itor);
}
Modified: trunk/src/unit_types.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.cpp?rev=29494&r1=29493&r2=29494&view=diff
==============================================================================
--- trunk/src/unit_types.cpp (original)
+++ trunk/src/unit_types.cpp Tue Sep 16 20:41:55 2008
@@ -1191,34 +1191,6 @@
lg::info(lg::config) << "added " << id << " to unit_type list
(unit_type_data.unit_types)\n";
}
- // FIXME OBSOLETE compatibility hack to be removed in 1.5.3
- for(i = cfg.child_range("unit"); i.first != i.second; ++i.first)
- {
- std::string id = (**i.first)["id"];
- if((**i.first).child("base_unit"))
- {
- // Derive a new unit type from an existing base unit id
- const std::string based_from =
(*(**i.first).child("base_unit"))["id"];
- config from_cfg = find_config(based_from);
-
- //merge the base_unit config into this one
- //ugly hack, but couldn't think of anything better for the moment
- from_cfg.merge_with(**i.first);
- (**i.first).merge_with(from_cfg);
-
- (**i.first).clear_children("base_unit");
- (**i.first)["id"] = id;
- }
- // we insert an empty unit_type and build it after the copy (for
performance)
- std::pair<unit_type_map::iterator,bool> insertion =
- insert(std::pair<const std::string,unit_type>(id,unit_type()));
-
- // if (!insertion.second)
- // TODO: else { warning for multiple units with same id}
- lg::info(lg::config) << "added " << id << " to unit_type list
(unit_type_data.unit_types)\n";
- std::cerr << "warning: UnitWML [unit] tag will be removed in
1.5.3, run wmllint on WML defining " << id << " to convert it to using
[unit_type]" << std::endl;
- }
-
build_all(unit_type::CREATED);
}
@@ -1258,9 +1230,6 @@
DBG_UT << "unit type not found: " << key << "\n";
DBG_UT << *unit_cfg_ << "\n";
-
- // FIXME OBSOLETE compatibility hack to be removed in 1.5.3
- cfg = unit_cfg_->find_child("unit", "id", key);
assert(cfg != NULL);
return *cfg;
@@ -1399,9 +1368,6 @@
// hypothetical recruit is.
vals = &((**i.first).values);
temp = vals->find("unit_type");
- //FIXME OBSOLETE Remove in 1.5.3
- if(temp == vals->end())
- temp = vals->find("unit");
if(temp != vals->end()) {
const std::vector<std::string>& types =
utils::split((*temp).second);
if(std::find(types.begin(),types.end(),id()) == types.end()) {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits