tmp update

This commit is contained in:
张壹 2025-01-13 14:49:46 +08:00
parent 2a4f54cf33
commit 51467bcec0

View File

@ -621,21 +621,21 @@ void data_output(const std::vector<std::string> &cmd_units)
copy_str[i - 1] = cmd_units[i];
}
meshdata curr_data;
meshdata *data_ptr;
if (copy_str[0] == "enable")
{
for (size_t i = 1; i < copy_str.size(); i++)
{
curr_data = rg.get_data(copy_str[i]);
curr_data.output_ok_ = true;
data_ptr = rg.get_data_ptr(copy_str[i]);
data_ptr->output_ok_ = true;
}
}
else if (copy_str[0] == "disable")
{
for (size_t i = 1; i < copy_str.size(); i++)
{
curr_data = rg.get_data(copy_str[i]);
curr_data.output_ok_ = false;
data_ptr = rg.get_data_ptr(copy_str[i]);
data_ptr->output_ok_ = false;
}
}
else throw std::runtime_error("data-output: invalid operation type.");
@ -653,7 +653,7 @@ void data_rename(const std::vector<std::string> &cmd_units)
copy_str[i - 1] = cmd_units[i];
}
meshdata curr_data = rg.get_data(copy_str[0]);
meshdata &curr_data = rg.get_data(copy_str[0]);
curr_data.name_ = copy_str[1];
return;
}
@ -693,13 +693,13 @@ void get_stats(const std::vector<std::string> &cmd_units)
copy_str[i - 1] = cmd_units[i];
}
meshdata curr_data;
meshdata *data_ptr;
std::vector<double> stats;
for (size_t i = 0; i < copy_str.size(); i++)
{
curr_data = rg.get_data(copy_str[i]);
curr_data.show_info();
curr_data.show_stats();
data_ptr = rg.get_data_ptr(copy_str[i]);
data_ptr->show_info();
data_ptr->show_stats();
}
return;
}