mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Remove unneeded copies in Spicy plugin glue compiler
This commit is contained in:
parent
fbe8dbce5e
commit
9355512adc
1 changed files with 2 additions and 2 deletions
|
@ -1046,7 +1046,7 @@ bool GlueCompiler::compile() {
|
||||||
preinit_body.addCall("zeek_rt::register_file_analyzer",
|
preinit_body.addCall("zeek_rt::register_file_analyzer",
|
||||||
{builder()->stringMutable(a.name.str()),
|
{builder()->stringMutable(a.name.str()),
|
||||||
builder()->vector(hilti::util::transform(a.mime_types,
|
builder()->vector(hilti::util::transform(a.mime_types,
|
||||||
[&](auto m) {
|
[&](const auto& m) {
|
||||||
return builder()
|
return builder()
|
||||||
->stringMutable(m)
|
->stringMutable(m)
|
||||||
->template as<hilti::Expression>();
|
->template as<hilti::Expression>();
|
||||||
|
@ -1100,7 +1100,7 @@ bool GlueCompiler::compile() {
|
||||||
m->spicy_module->add(context(), import_);
|
m->spicy_module->add(context(), import_);
|
||||||
|
|
||||||
// Create a vector of unique parent paths from all EVTs files going into this module.
|
// Create a vector of unique parent paths from all EVTs files going into this module.
|
||||||
auto search_dirs = hilti::util::transform(m->evts, [](auto p) { return p.parent_path(); });
|
auto search_dirs = hilti::util::transform(m->evts, [](const auto& p) { return p.parent_path(); });
|
||||||
auto search_dirs_vec = std::vector<hilti::rt::filesystem::path>(search_dirs.begin(), search_dirs.end());
|
auto search_dirs_vec = std::vector<hilti::rt::filesystem::path>(search_dirs.begin(), search_dirs.end());
|
||||||
|
|
||||||
// Import any dependencies.
|
// Import any dependencies.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue