mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 09:55:26 +00:00
Replace ConstructorExpression::(Is|As)* with Castable
Change-Id: I18e9768fef36b79cb0e65c6eb79fd147013c54f0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34317 Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
@@ -131,13 +131,14 @@ std::map<uint32_t, Scalar> Inspector::GetConstantIDs() {
|
||||
}
|
||||
|
||||
auto* constructor = expression->As<ast::ConstructorExpression>();
|
||||
if (!constructor->IsScalarConstructor()) {
|
||||
if (!constructor->Is<ast::ScalarConstructorExpression>()) {
|
||||
// This is invalid WGSL, but handling gracefully.
|
||||
result[constant_id] = Scalar();
|
||||
continue;
|
||||
}
|
||||
|
||||
auto* literal = constructor->AsScalarConstructor()->literal();
|
||||
auto* literal =
|
||||
constructor->As<ast::ScalarConstructorExpression>()->literal();
|
||||
if (!literal) {
|
||||
// This is invalid WGSL, but handling gracefully.
|
||||
result[constant_id] = Scalar();
|
||||
|
||||
Reference in New Issue
Block a user