feat: 支持多图单阈值的写法

This commit is contained in:
zzyyyl
2023-10-02 18:02:37 +08:00
parent bc8a1d8108
commit 5f6f780188
2 changed files with 5 additions and 11 deletions

View File

@@ -776,7 +776,9 @@ asst::TaskData::taskptr_t asst::TaskData::generate_match_task_info(std::string_v
default_ptr->templ_thresholds.back());
}
else if (threshold_opt->is_number()) {
match_task_info_ptr->templ_thresholds = { threshold_opt->as_double() };
// 单个数值时,所有模板都使用这个阈值
match_task_info_ptr->templ_thresholds.resize(match_task_info_ptr->templ_names.size(),
threshold_opt->as_double());
}
else if (threshold_opt->is_array()) {
ranges::copy(threshold_opt->as_array() | views::transform(&ranges::range_value_t<json::array>::as_double),