mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Replace Expression::(Is|As)* with Castable
Change-Id: I6ab98ed8b198f1b3b42ce1f09a6c4f992d65fe95 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34316 Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
@@ -124,13 +124,13 @@ std::map<uint32_t, Scalar> Inspector::GetConstantIDs() {
|
||||
}
|
||||
|
||||
auto* expression = var->constructor();
|
||||
if (!expression->IsConstructor()) {
|
||||
if (!expression->Is<ast::ConstructorExpression>()) {
|
||||
// This is invalid WGSL, but handling gracefully.
|
||||
result[constant_id] = Scalar();
|
||||
continue;
|
||||
}
|
||||
|
||||
auto* constructor = expression->AsConstructor();
|
||||
auto* constructor = expression->As<ast::ConstructorExpression>();
|
||||
if (!constructor->IsScalarConstructor()) {
|
||||
// This is invalid WGSL, but handling gracefully.
|
||||
result[constant_id] = Scalar();
|
||||
|
||||
Reference in New Issue
Block a user