Skip to content

Commit

Permalink
Replaced std::make_tuple with just std::tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jan 19, 2021
1 parent 9de9c21 commit 7e57794
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/actions/create.cpp
Expand Up @@ -660,7 +660,7 @@ place_recruit_result place_recruit(unit_ptr u, const map_location &recruit_locat
std::get<0>(res) |= std::get<0>(resources::game_events->pump().fire(event_name, current_loc, recruited_from));
}
if ( !validate_recruit_iterator(new_unit_itor, current_loc) )
return std::make_tuple(true, 0, false);
return std::tuple(true, 0, false);
new_unit_itor->set_hidden(true);
}
preferences::encountered_units().insert(new_unit_itor->type_id());
Expand All @@ -681,7 +681,7 @@ place_recruit_result place_recruit(unit_ptr u, const map_location &recruit_locat
std::get<1>(res) = resources::gameboard->village_owner(current_loc);
std::get<0>(res) |= std::get<0>(actions::get_village(current_loc, new_unit_itor->side(), &std::get<2>(res)));
if ( !validate_recruit_iterator(new_unit_itor, current_loc) )
return std::make_tuple(true, 0, false);
return std::tuple(true, 0, false);
}

// Fog clearing.
Expand Down
2 changes: 1 addition & 1 deletion src/game_events/pump.cpp
Expand Up @@ -601,7 +601,7 @@ pump_result_t wml_event_pump::operator()()
// This is used to track when moves, recruits, etc. happen.
resources::whiteboard->on_gamestate_change();

return std::make_tuple(undo_disabled(), action_canceled());
return std::tuple(undo_disabled(), action_canceled());
}

void wml_event_pump::flush_messages()
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/unit_list.cpp
Expand Up @@ -165,7 +165,7 @@ void unit_list::pre_show(window& window)
list.register_sorting_option(3, [this](const int i) { return unit_list_[i]->hitpoints(); });
list.register_sorting_option(4, [this](const int i) {
const unit& u = *unit_list_[i];
return std::make_tuple(u.level(), -static_cast<int>(u.experience_to_advance()));
return std::tuple(u.level(), -static_cast<int>(u.experience_to_advance()));
});
list.register_sorting_option(5, [this](const int i) { return unit_list_[i]->experience(); });
list.register_translatable_sorting_option(6, [this](const int i) {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/unit_recall.cpp
Expand Up @@ -296,7 +296,7 @@ void unit_recall::pre_show(window& window)
list.register_translatable_sorting_option(1, [this](const int i) { return recall_list_[i]->name().str(); });
list.register_sorting_option(2, [this](const int i) {
const unit& u = *recall_list_[i];
return std::make_tuple(u.level(), -static_cast<int>(u.experience_to_advance()));
return std::tuple(u.level(), -static_cast<int>(u.experience_to_advance()));
});
list.register_sorting_option(3, [this](const int i) { return recall_list_[i]->experience(); });
list.register_translatable_sorting_option(4, [this](const int i) {
Expand Down
2 changes: 1 addition & 1 deletion src/units/filter.cpp
Expand Up @@ -690,7 +690,7 @@ void unit_filter_compound::fill(vconfig cfg)
for(auto child : cfg.all_ordered()) {
CONDITIONAL_TYPE cond;
if(cond.parse(child.first)) {
cond_children_.emplace_back(std::piecewise_construct_t(), std::make_tuple(cond), std::make_tuple(child.second));
cond_children_.emplace_back(std::piecewise_construct_t(), std::tuple(cond), std::tuple(child.second));
}
else if (child.first == "filter_wml") {
create_child(child.second, [](const vconfig& c, const unit_filter_args& args) {
Expand Down

0 comments on commit 7e57794

Please sign in to comment.