mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Move Reporter to zeek namespace
This commit is contained in:
parent
7cedd94ee7
commit
bfab224d7c
132 changed files with 1010 additions and 987 deletions
20
src/ID.cc
20
src/ID.cc
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue