mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
Merge remote-tracking branch 'origin/topic/vern/CPP-speedup'
* origin/topic/vern/CPP-speedup: use iterator-based idiom for check-if-present-then-access const-ify member function switch looping over vectors to use iterators remove unused local variables efficiency fix - return a reference rather than a copy of a map fix for case-sensitive file systems geez sometimes it's signed sometimes it's not documentation updates remove -O add-C++ and -O update-C++ options extensive rewrite of generation & execution of run-time initialization factoring out CPPEscape to be a standalone function removing unused SubNetType class
This commit is contained in:
commit
e0b4659488
35 changed files with 3574 additions and 1714 deletions
22
src/Type.cc
22
src/Type.cc
|
@ -123,18 +123,6 @@ RecordType* Type::AsRecordType()
|
|||
return (RecordType*)this;
|
||||
}
|
||||
|
||||
const SubNetType* Type::AsSubNetType() const
|
||||
{
|
||||
CHECK_TYPE_TAG(TYPE_SUBNET, "Type::AsSubNetType");
|
||||
return (const SubNetType*)this;
|
||||
}
|
||||
|
||||
SubNetType* Type::AsSubNetType()
|
||||
{
|
||||
CHECK_TYPE_TAG(TYPE_SUBNET, "Type::AsSubNetType");
|
||||
return (SubNetType*)this;
|
||||
}
|
||||
|
||||
const FuncType* Type::AsFuncType() const
|
||||
{
|
||||
CHECK_TYPE_TAG(TYPE_FUNC, "Type::AsFuncType");
|
||||
|
@ -1447,16 +1435,6 @@ string RecordType::GetFieldDeprecationWarning(int field, bool has_check) const
|
|||
return "";
|
||||
}
|
||||
|
||||
SubNetType::SubNetType() : Type(TYPE_SUBNET) { }
|
||||
|
||||
void SubNetType::Describe(ODesc* d) const
|
||||
{
|
||||
if ( d->IsReadable() )
|
||||
d->Add("subnet");
|
||||
else
|
||||
d->Add(int(Tag()));
|
||||
}
|
||||
|
||||
FileType::FileType(TypePtr yield_type) : Type(TYPE_FILE), yield(std::move(yield_type)) { }
|
||||
|
||||
FileType::~FileType() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue