Move Reporter to zeek namespace

This commit is contained in:
Tim Wojtulewicz 2020-07-20 10:57:36 -07:00
parent 7cedd94ee7
commit bfab224d7c
132 changed files with 1010 additions and 987 deletions

View file

@ -42,8 +42,8 @@ const zeek::TypePtr& zeek::id::find_type(std::string_view name)
auto id = zeek::detail::global_scope()->Find(name);
if ( ! id )
reporter->InternalError("Failed to find type named: %s",
std::string(name).data());
zeek::reporter->InternalError("Failed to find type named: %s",
std::string(name).data());
return id->GetType();
}
@ -53,8 +53,8 @@ const zeek::ValPtr& zeek::id::find_val(std::string_view name)
auto id = zeek::detail::global_scope()->Find(name);
if ( ! id )
reporter->InternalError("Failed to find variable named: %s",
std::string(name).data());
zeek::reporter->InternalError("Failed to find variable named: %s",
std::string(name).data());
return id->GetVal();
}
@ -64,12 +64,12 @@ const zeek::ValPtr& zeek::id::find_const(std::string_view name)
auto id = zeek::detail::global_scope()->Find(name);
if ( ! id )
reporter->InternalError("Failed to find variable named: %s",
std::string(name).data());
zeek::reporter->InternalError("Failed to find variable named: %s",
std::string(name).data());
if ( ! id->IsConst() )
reporter->InternalError("Variable is not 'const', but expected to be: %s",
std::string(name).data());
zeek::reporter->InternalError("Variable is not 'const', but expected to be: %s",
std::string(name).data());
return id->GetVal();
}
@ -82,8 +82,8 @@ zeek::FuncPtr zeek::id::find_func(std::string_view name)
return nullptr;
if ( ! IsFunc(v->GetType()->Tag()) )
reporter->InternalError("Expected variable '%s' to be a function",
std::string(name).data());
zeek::reporter->InternalError("Expected variable '%s' to be a function",
std::string(name).data());
return v->AsFuncPtr();
}