mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Move ID to the zeek::detail namespace
This commit is contained in:
parent
9992ec5c11
commit
0d623d003c
30 changed files with 221 additions and 182 deletions
12
src/Frame.cc
12
src/Frame.cc
|
@ -77,7 +77,7 @@ void Frame::SetElementWeak(int n, Val* v)
|
|||
frame[n] = {{AdoptRef{}, v}, true};
|
||||
}
|
||||
|
||||
void Frame::SetElement(const ID* id, IntrusivePtr<Val> v)
|
||||
void Frame::SetElement(const zeek::detail::ID* id, IntrusivePtr<Val> v)
|
||||
{
|
||||
if ( closure )
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ void Frame::SetElement(const ID* id, IntrusivePtr<Val> v)
|
|||
SetElement(id->Offset(), std::move(v));
|
||||
}
|
||||
|
||||
const IntrusivePtr<Val>& Frame::GetElementByID(const ID* id) const
|
||||
const IntrusivePtr<Val>& Frame::GetElementByID(const zeek::detail::ID* id) const
|
||||
{
|
||||
if ( closure )
|
||||
{
|
||||
|
@ -478,7 +478,7 @@ void Frame::AddKnownOffsets(const id_list& ids)
|
|||
offset_map = std::make_unique<OffsetMap>();
|
||||
|
||||
std::transform(ids.begin(), ids.end(), std::inserter(*offset_map, offset_map->end()),
|
||||
[] (const ID* id) -> std::pair<std::string, int>
|
||||
[] (const zeek::detail::ID* id) -> std::pair<std::string, int>
|
||||
{
|
||||
return std::make_pair(std::string(id->Name()), id->Offset());
|
||||
});
|
||||
|
@ -523,10 +523,10 @@ void Frame::ClearElement(int n)
|
|||
frame[n] = {nullptr, false};
|
||||
}
|
||||
|
||||
bool Frame::IsOuterID(const ID* in) const
|
||||
bool Frame::IsOuterID(const zeek::detail::ID* in) const
|
||||
{
|
||||
return std::any_of(outer_ids.begin(), outer_ids.end(),
|
||||
[&in](ID* id)-> bool { return strcmp(id->Name(), in->Name()) == 0; });
|
||||
[&in](zeek::detail::ID* id)-> bool { return strcmp(id->Name(), in->Name()) == 0; });
|
||||
}
|
||||
|
||||
broker::expected<broker::data> Frame::SerializeIDList(const id_list& in)
|
||||
|
@ -588,7 +588,7 @@ Frame::UnserializeIDList(const broker::vector& data)
|
|||
return std::make_pair(false, std::move(rval));
|
||||
}
|
||||
|
||||
ID* id = new ID(has_name->c_str(), SCOPE_FUNCTION, false);
|
||||
auto* id = new zeek::detail::ID(has_name->c_str(), zeek::detail::SCOPE_FUNCTION, false);
|
||||
id->SetOffset(*has_offset);
|
||||
rval.push_back(id);
|
||||
std::advance(where, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue