explicit composites_data(struct rspamd_task *task, struct rspamd_scan_result *mres) :
task(task), composite(nullptr), metric_res(mres) {
- checked.resize(rspamd_composites_manager_nelts(task->cfg->composites_manager) * 2);
+ checked.resize(rspamd_composites_manager_nelts(task->cfg->composites_manager) * 2,
+ false);
}
};
}
auto size(void) const -> std::size_t {
- return composites.size();
+ return all_composites.size();
}
auto find(std::string_view name) const -> const rspamd_composite * {
auto &composite = all_composites.emplace_back(std::make_shared<rspamd_composite>());
composite->expr = expr;
- composite->id = all_composites.size();
+ composite->id = all_composites.size() - 1;
composite->str_expr = composite_expression;
composite->sym = composite_name;