dts::make_unique -> std::make_unique in unbuilt plugins

Followup to #3537
develop
lethosor 2023-08-01 00:59:26 -04:00
parent e0a9626876
commit 94dae7a1f1
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
7 changed files with 18 additions and 18 deletions

@ -162,7 +162,7 @@ type_identity *Checker::wrap_in_stl_ptr_vector(type_identity *base)
{
return it->second.get();
}
return (wrappers[base] = dts::make_unique<df::stl_ptr_vector_identity>(base, nullptr)).get();
return (wrappers[base] = std::make_unique<df::stl_ptr_vector_identity>(base, nullptr)).get();
}
type_identity *Checker::wrap_in_pointer(type_identity *base)
@ -173,7 +173,7 @@ type_identity *Checker::wrap_in_pointer(type_identity *base)
{
return it->second.get();
}
return (wrappers[base] = dts::make_unique<df::pointer_identity>(base)).get();
return (wrappers[base] = std::make_unique<df::pointer_identity>(base)).get();
}
std::map<size_t, std::vector<std::string>> known_types_by_size;

@ -951,7 +951,7 @@ public:
{
df::unit *selected_unit = (selected_column == 1) ? dwarf_activity_column.getFirstSelectedElem() : nullptr;
Screen::dismiss(this);
Screen::show(dts::make_unique<ViewscreenDwarfStats>(selected_unit), plugin_self);
Screen::show(std::make_unique<ViewscreenDwarfStats>(selected_unit), plugin_self);
}
else if (input->count(interface_key::CUSTOM_SHIFT_Z))
{
@ -1676,7 +1676,7 @@ private:
static void open_stats_screen() {
Screen::show(dts::make_unique<ViewscreenFortStats>(), plugin_self);
Screen::show(std::make_unique<ViewscreenFortStats>(), plugin_self);
}
static void add_work_history(df::unit *unit, activity_type type) {
@ -1776,12 +1776,12 @@ static command_result dwarfmonitor_cmd(color_ostream &, vector <string> & parame
if (cmd == 's' || cmd == 'S') {
CoreSuspender guard;
if(Maps::IsValid())
Screen::show(dts::make_unique<ViewscreenFortStats>(), plugin_self);
Screen::show(std::make_unique<ViewscreenFortStats>(), plugin_self);
}
else if (cmd == 'p' || cmd == 'P') {
CoreSuspender guard;
if(Maps::IsValid())
Screen::show(dts::make_unique<ViewscreenPreferences>(), plugin_self);
Screen::show(std::make_unique<ViewscreenPreferences>(), plugin_self);
}
else
return CR_WRONG_USAGE;

@ -1805,7 +1805,7 @@ void embark_assist::finder_ui::init(DFHack::Plugin *plugin_self, embark_assist::
embark_assist::finder_ui::ui_setup(find_callback, max_inorganic);
}
if (!fileresult) {
Screen::show(dts::make_unique<ViewscreenFindUi>(), plugin_self);
Screen::show(std::make_unique<ViewscreenFindUi>(), plugin_self);
}
else
{

@ -411,5 +411,5 @@ namespace embark_assist{
//===============================================================================
void embark_assist::help_ui::init(DFHack::Plugin *plugin_self) {
Screen::show(dts::make_unique<embark_assist::help_ui::ViewscreenHelpUi>(), plugin_self);
Screen::show(std::make_unique<embark_assist::help_ui::ViewscreenHelpUi>(), plugin_self);
}

@ -694,7 +694,7 @@ struct choose_start_site_hook : df::viewscreen_choose_start_sitest
void display_settings()
{
Screen::show(dts::make_unique<embark_tools_settings>(), plugin_self);
Screen::show(std::make_unique<embark_tools_settings>(), plugin_self);
}
inline bool is_valid_page()

@ -1875,14 +1875,14 @@ void viewscreen_unitlaborsst::feed(set<df::interface_key> *events)
if (events->count(interface_key::CUSTOM_B))
{
Screen::show(dts::make_unique<viewscreen_unitbatchopst>(units, true, &do_refresh_names), plugin_self);
Screen::show(std::make_unique<viewscreen_unitbatchopst>(units, true, &do_refresh_names), plugin_self);
}
if (events->count(interface_key::CUSTOM_E))
{
vector<UnitInfo*> tmp;
tmp.push_back(cur);
Screen::show(dts::make_unique<viewscreen_unitbatchopst>(tmp, false, &do_refresh_names), plugin_self);
Screen::show(std::make_unique<viewscreen_unitbatchopst>(tmp, false, &do_refresh_names), plugin_self);
}
if (events->count(interface_key::CUSTOM_P))
@ -1893,11 +1893,11 @@ void viewscreen_unitlaborsst::feed(set<df::interface_key> *events)
has_selected = true;
if (has_selected) {
Screen::show(dts::make_unique<viewscreen_unitprofessionset>(units, true), plugin_self);
Screen::show(std::make_unique<viewscreen_unitprofessionset>(units, true), plugin_self);
} else {
vector<UnitInfo*> tmp;
tmp.push_back(cur);
Screen::show(dts::make_unique<viewscreen_unitprofessionset>(tmp, false), plugin_self);
Screen::show(std::make_unique<viewscreen_unitprofessionset>(tmp, false), plugin_self);
}
}
@ -2286,7 +2286,7 @@ struct unitlist_hook : df::viewscreen_unitlistst
{
if (units[page].size())
{
Screen::show(dts::make_unique<viewscreen_unitlaborsst>(units[page], cursor_pos[page]), plugin_self);
Screen::show(std::make_unique<viewscreen_unitlaborsst>(units[page], cursor_pos[page]), plugin_self);
return;
}
}

@ -685,7 +685,7 @@ public:
}
else if (input->count(interface_key::HELP))
{
Screen::show(dts::make_unique<search_help>(), plugin_self);
Screen::show(std::make_unique<search_help>(), plugin_self);
}
bool key_processed = false;
@ -1350,7 +1350,7 @@ struct stocks_hook : public df::viewscreen_storesst
if (input->count(interface_key::CUSTOM_E))
{
Screen::dismiss(this);
Screen::show(dts::make_unique<ViewscreenStocks>(), plugin_self);
Screen::show(std::make_unique<ViewscreenStocks>(), plugin_self);
return;
}
INTERPOSE_NEXT(feed)(input);
@ -1385,7 +1385,7 @@ struct stocks_stockpile_hook : public df::viewscreen_dwarfmodest
if (input->count(interface_key::CUSTOM_I))
{
Screen::show(dts::make_unique<ViewscreenStocks>(sp), plugin_self);
Screen::show(std::make_unique<ViewscreenStocks>(sp), plugin_self);
return true;
}
@ -1459,7 +1459,7 @@ static command_result stocks_cmd(color_ostream &out, vector <string> & parameter
}
else if (toLower(parameters[0])[0] == 's')
{
Screen::show(dts::make_unique<ViewscreenStocks>(), plugin_self);
Screen::show(std::make_unique<ViewscreenStocks>(), plugin_self);
return CR_OK;
}
}