Skip to content

Commit

Permalink
remove unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Jul 23, 2019
1 parent ba02566 commit 1fafa76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 5 additions & 6 deletions src/units/types.cpp
Expand Up @@ -224,7 +224,7 @@ void unit_type::build_help_index(
}

// Make sure we are built to the preceding build level.
build_created(mv_types, races, traits);
build_created();

type_name_ = cfg_["name"];
description_ = cfg_["description"];
Expand Down Expand Up @@ -363,8 +363,7 @@ void unit_type::build_help_index(
* This creates the gender-specific types (if needed) and also defines how much
* experience is needed to advance as well as what this advances to.
*/
void unit_type::build_created(
const movement_type_map& mv_types, const race_map& races, const config::const_child_itors& traits)
void unit_type::build_created()
{
// Don't build twice.
if(CREATED <= build_status_) {
Expand All @@ -389,7 +388,7 @@ void unit_type::build_created(

for(unsigned i = 0; i < gender_types_.size(); ++i) {
if(gender_types_[i]) {
gender_types_[i]->build_created(mv_types, races, traits);
gender_types_[i]->build_created();
}
}

Expand Down Expand Up @@ -422,7 +421,7 @@ void unit_type::build(BUILD_STATUS status,

case CREATED:
// Build the basic data.
build_created(movement_types, races, traits);
build_created();
return;

case VARIATIONS: // Implemented as part of HELP_INDEXED
Expand Down Expand Up @@ -1437,7 +1436,7 @@ void unit_type::apply_scenario_fix(const config& cfg)
}
if(auto attr = cfg.get("add_advancement")) {
for(const auto& str : utils::split(attr->str())) {
advances_to_.push_back(str);
advances_to_.push_back(str);
}
}
if(auto attr = cfg.get("remove_advancement")) {
Expand Down
3 changes: 1 addition & 2 deletions src/units/types.hpp
Expand Up @@ -82,8 +82,7 @@ class unit_type
void build_help_index(const movement_type_map &movement_types,
const race_map &races, const config::const_child_itors &traits);
/// Load the most needed data into an empty unit_type (build to CREATE).
void build_created(const movement_type_map &movement_types,
const race_map &races, const config::const_child_itors &traits);
void build_created();

typedef std::map<std::string,unit_type> variations_map;
public:
Expand Down

0 comments on commit 1fafa76

Please sign in to comment.