Deprecate Scope::Lookup(), replace with Scope::Find()

This commit is contained in:
Jon Siwek 2020-05-12 22:20:42 -07:00
parent a5762c12cc
commit 8f95a2a0bb
27 changed files with 65 additions and 72 deletions

View file

@ -193,7 +193,7 @@ void net_init(const std::optional<std::string>& interface,
reporter->FatalError("problem opening dump file %s (%s)",
writefile, pkt_dumper->ErrorMsg());
if ( ID* id = global_scope()->Lookup("trace_output_file") )
if ( const auto& id = global_scope()->Find("trace_output_file") )
id->SetVal(make_intrusive<StringVal>(writefile));
else
reporter->Error("trace_output_file not defined in bro.init");