sundry accessors/cast-ers; RE_Matcher's track their construction values

This commit is contained in:
Vern Paxson 2021-03-18 10:33:10 -07:00
parent 17affdb858
commit d53d2ac755
8 changed files with 50 additions and 3 deletions

View file

@ -147,6 +147,18 @@ FuncType* Type::AsFuncType()
return (FuncType*) this;
}
const FileType* Type::AsFileType() const
{
CHECK_TYPE_TAG(TYPE_FILE, "Type::AsFileType");
return (const FileType*) this;
}
FileType* Type::AsFileType()
{
CHECK_TYPE_TAG(TYPE_FILE, "Type::AsFileType");
return (FileType*) this;
}
const EnumType* Type::AsEnumType() const
{
CHECK_TYPE_TAG(TYPE_ENUM, "Type::AsEnumType");