From 0d206996cd68b9f08ae1b4d9da6f16293984302c Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 4 Feb 2019 12:11:18 -0500 Subject: Feature/casting tidyup (#822) * Use 'is' over 'as' where appropriate. * dynamic_cast -> dynamicCast * Replace 'dynamicCast' with 'as' where has no change in behavior/ambiguity. * Replace dynamicCast with as where doesn't change behavior/non ambiguous. --- source/slang/ir-union.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/ir-union.cpp') diff --git a/source/slang/ir-union.cpp b/source/slang/ir-union.cpp index c50d669e1..91e60c5bf 100644 --- a/source/slang/ir-union.cpp +++ b/source/slang/ir-union.cpp @@ -366,7 +366,7 @@ struct DesugarUnionTypesContext // there to be complete type layout information for the // types involved. // - auto structTypeLayout = dynamic_cast(payloadTypeLayout); + auto structTypeLayout = as(payloadTypeLayout); SLANG_ASSERT(structTypeLayout); // We are going to emit code to extract each of the fields @@ -665,14 +665,14 @@ struct DesugarUnionTypesContext info->replacementInst = structType; // We require/expect the earlier code generation steps to have - // assocaited a layout with every tagged union that appears in + // associated a layout with every tagged union that appears in // the code. // auto layoutDecoration = type->findDecoration(); SLANG_ASSERT(layoutDecoration); auto layout = layoutDecoration->getLayout(); SLANG_ASSERT(layout); - auto taggedUnionTypeLayout = dynamic_cast(layout); + auto taggedUnionTypeLayout = as(layout); SLANG_ASSERT(taggedUnionTypeLayout); info->taggedUnionTypeLayout = taggedUnionTypeLayout; -- cgit v1.2.3