mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Prevent copies in various places
This commit is contained in:
parent
8931c352ef
commit
2fd20f71ad
2 changed files with 8 additions and 8 deletions
|
@ -93,7 +93,7 @@ Driver::Driver(std::unique_ptr<GlueCompiler> glue, const char* argv0, hilti::rt:
|
|||
|
||||
// We make our search paths relative to the plugin library, so that the
|
||||
// plugin installation can move around.
|
||||
options.library_paths.push_back(lib_path);
|
||||
options.library_paths.push_back(std::move(lib_path));
|
||||
} catch ( const hilti::rt::filesystem::filesystem_error& e ) {
|
||||
::hilti::logger().warning(
|
||||
hilti::util::fmt("invalid plugin base directory %s: %s", lib_path.native(), e.what()));
|
||||
|
|
|
@ -479,19 +479,19 @@ bool GlueCompiler::loadEvtFile(hilti::rt::filesystem::path& path) {
|
|||
if ( looking_at(*chunk, 0, "protocol") ) {
|
||||
auto a = parseProtocolAnalyzer(*chunk);
|
||||
SPICY_DEBUG(hilti::util::fmt(" Got protocol analyzer definition for %s", a.name));
|
||||
_protocol_analyzers.push_back(a);
|
||||
_protocol_analyzers.push_back(std::move(a));
|
||||
}
|
||||
|
||||
else if ( looking_at(*chunk, 0, "file") ) {
|
||||
auto a = parseFileAnalyzer(*chunk);
|
||||
SPICY_DEBUG(hilti::util::fmt(" Got file analyzer definition for %s", a.name));
|
||||
_file_analyzers.push_back(a);
|
||||
_file_analyzers.push_back(std::move(a));
|
||||
}
|
||||
|
||||
else if ( looking_at(*chunk, 0, "packet") ) {
|
||||
auto a = parsePacketAnalyzer(*chunk);
|
||||
SPICY_DEBUG(hilti::util::fmt(" Got packet analyzer definition for %s", a.name));
|
||||
_packet_analyzers.push_back(a);
|
||||
_packet_analyzers.push_back(std::move(a));
|
||||
}
|
||||
|
||||
else if ( looking_at(*chunk, 0, "on") ) {
|
||||
|
@ -562,7 +562,7 @@ bool GlueCompiler::loadEvtFile(hilti::rt::filesystem::path& path) {
|
|||
}
|
||||
|
||||
for ( auto&& ev : new_events )
|
||||
_events.push_back(ev);
|
||||
_events.push_back(std::move(ev));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -879,7 +879,7 @@ glue::Event GlueCompiler::parseEvent(const std::string& chunk) {
|
|||
eat_token(chunk, &i, ",");
|
||||
|
||||
auto expr = extract_expr(chunk, &i);
|
||||
ev.exprs.push_back(expr);
|
||||
ev.exprs.push_back(std::move(expr));
|
||||
first = false;
|
||||
}
|
||||
|
||||
|
@ -945,7 +945,7 @@ glue::Export GlueCompiler::parseExport(const std::string& chunk) {
|
|||
|
||||
if ( looking_at(chunk, i, "&log") ) {
|
||||
eat_token(chunk, &i, "&log");
|
||||
export_.logs.insert(field);
|
||||
export_.logs.insert(std::move(field));
|
||||
}
|
||||
|
||||
if ( looking_at(chunk, i, "}") ) {
|
||||
|
@ -1193,7 +1193,7 @@ bool GlueCompiler::PopulateEvents() {
|
|||
acc.expression = e;
|
||||
acc.location = ev.location;
|
||||
// acc.dollar_id = util::startsWith(e, "$");
|
||||
ev.expression_accessors.push_back(acc);
|
||||
ev.expression_accessors.push_back(std::move(acc));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue