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/parameter-binding.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/slang/parameter-binding.cpp') diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp index e722ccbb9..2fb571db2 100644 --- a/source/slang/parameter-binding.cpp +++ b/source/slang/parameter-binding.cpp @@ -523,7 +523,7 @@ LayoutSemanticInfo ExtractLayoutSemanticInfo( UInt space = 0; - if( auto registerSemantic = dynamic_cast(semantic) ) + if( auto registerSemantic = as(semantic) ) { auto const& spaceName = registerSemantic->spaceName.Content; if(spaceName.size() != 0) @@ -698,25 +698,25 @@ static bool validateValuesMatch( Val* right, StructuralTypeMatchStack* stack) { - if( auto leftType = dynamic_cast(left) ) + if( auto leftType = dynamicCast(left) ) { - if( auto rightType = dynamic_cast(right) ) + if( auto rightType = dynamicCast(right) ) { return validateTypesMatch(context, leftType, rightType, stack); } } - if( auto leftInt = dynamic_cast(left) ) + if( auto leftInt = dynamicCast(left) ) { - if( auto rightInt = dynamic_cast(right) ) + if( auto rightInt = dynamicCast(right) ) { return validateIntValuesMatch(context, leftInt, rightInt, stack); } } - if( auto leftWitness = dynamic_cast(left) ) + if( auto leftWitness = dynamicCast(left) ) { - if( auto rightWitness = dynamic_cast(right) ) + if( auto rightWitness = dynamicCast(right) ) { return true; } -- cgit v1.2.3