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

@@ -188,11 +188,11 @@ std::vector<ResourceBinding> Inspector::GetUniformBufferResourceBindings(
}
auto* unwrapped_type = var->type()->UnwrapIfNeeded();
if (!unwrapped_type->IsStruct()) {
if (!unwrapped_type->Is<ast::type::StructType>()) {
continue;
}
if (!unwrapped_type->AsStruct()->IsBlockDecorated()) {
if (!unwrapped_type->As<ast::type::StructType>()->IsBlockDecorated()) {
continue;
}
@@ -314,7 +314,7 @@ std::vector<ResourceBinding> Inspector::GetStorageBufferResourceBindingsImpl(
continue;
}
if (!var->type()->UnwrapIfNeeded()->IsStruct()) {
if (!var->type()->UnwrapIfNeeded()->Is<ast::type::StructType>()) {
continue;
}