Replace Type::(Is|As)Struct with Castable

Change-Id: I0bc5645d65d7b53058bda7b343a991a9614741be
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34271
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-11-30 23:30:58 +00:00
parent 351128a41e
commit d734dd0c10
35 changed files with 116 additions and 123 deletions

View File

@@ -83,8 +83,8 @@ bool ValidatorImpl::Validate(const ast::Module* module) {
bool ValidatorImpl::ValidateConstructedTypes(
const std::vector<ast::type::Type*>& constructed_types) {
for (auto* const ct : constructed_types) {
if (ct->IsStruct()) {
auto* st = ct->AsStruct();
if (ct->Is<ast::type::StructType>()) {
auto* st = ct->As<ast::type::StructType>();
for (auto* member : st->impl()->members()) {
if (member->type()->UnwrapAll()->Is<ast::type::ArrayType>()) {
auto* r = member->type()->UnwrapAll()->As<ast::type::ArrayType>();