summaryrefslogtreecommitdiff
path: root/source/slang/legalize-types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/legalize-types.cpp')
-rw-r--r--source/slang/legalize-types.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/slang/legalize-types.cpp b/source/slang/legalize-types.cpp
index 30590c02d..3accad448 100644
--- a/source/slang/legalize-types.cpp
+++ b/source/slang/legalize-types.cpp
@@ -109,7 +109,7 @@ ModuleDecl* findModuleForDecl(
{
for (auto dd = decl; dd; dd = dd->ParentDecl)
{
- if (auto moduleDecl = dynamic_cast<ModuleDecl*>(dd))
+ if (auto moduleDecl = as<ModuleDecl>(dd))
return moduleDecl;
}
return nullptr;
@@ -945,7 +945,7 @@ RefPtr<TypeLayout> getDerefTypeLayout(
if (!typeLayout)
return nullptr;
- if (auto parameterGroupTypeLayout = dynamic_cast<ParameterGroupTypeLayout*>(typeLayout))
+ if (auto parameterGroupTypeLayout = as<ParameterGroupTypeLayout>(typeLayout))
{
return parameterGroupTypeLayout->offsetElementTypeLayout;
}
@@ -962,13 +962,13 @@ RefPtr<VarLayout> getFieldLayout(
for(;;)
{
- if(auto arrayTypeLayout = dynamic_cast<ArrayTypeLayout*>(typeLayout))
+ if(auto arrayTypeLayout = as<ArrayTypeLayout>(typeLayout))
{
typeLayout = arrayTypeLayout->elementTypeLayout;
}
- else if(auto parameterGroupTypeLayotu = dynamic_cast<ParameterGroupTypeLayout*>(typeLayout))
+ else if(auto parameterGroupTypeLayout = as<ParameterGroupTypeLayout>(typeLayout))
{
- typeLayout = parameterGroupTypeLayotu->offsetElementTypeLayout;
+ typeLayout = parameterGroupTypeLayout->offsetElementTypeLayout;
}
else
{
@@ -977,7 +977,7 @@ RefPtr<VarLayout> getFieldLayout(
}
- if (auto structTypeLayout = dynamic_cast<StructTypeLayout*>(typeLayout))
+ if (auto structTypeLayout = as<StructTypeLayout>(typeLayout))
{
for(auto ff : structTypeLayout->fields)
{