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:
Tim Wojtulewicz 2021-11-23 19:43:48 -07:00
commit e0b4659488
35 changed files with 3574 additions and 1714 deletions

View file

@ -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;