From 664797e391f5193ccce5c5d5ca0d51e09d269b54 Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Mon, 31 Oct 2016 10:00:48 -0500 Subject: [PATCH] Move one-time-use variables into their call site #341 --- trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp b/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp index 98e4f346..37df541c 100644 --- a/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp +++ b/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp @@ -361,9 +361,7 @@ static bool checkForPrivateTemplateArgs( clang::ClassTemplateSpecializationDecl if (t->getTypeClass() == clang::Type::Record ) { clang::CXXRecordDecl * crd = t->getAsCXXRecordDecl() ; if ( clang::isa(crd) ) { - clang::ClassTemplateSpecializationDecl * inner_ctsd ; - inner_ctsd = clang::cast(crd) ; - return checkForPrivateTemplateArgs(inner_ctsd) ; + return checkForPrivateTemplateArgs(clang::cast(crd)) ; } } } @@ -388,9 +386,7 @@ static bool checkForConstTemplateArgs( clang::ClassTemplateSpecializationDecl * if (t->getTypeClass() == clang::Type::Record ) { clang::CXXRecordDecl * crd = t->getAsCXXRecordDecl() ; if ( clang::isa(crd) ) { - clang::ClassTemplateSpecializationDecl * inner_ctsd ; - inner_ctsd = clang::cast(crd) ; - return checkForConstTemplateArgs(inner_ctsd) ; + return checkForConstTemplateArgs(clang::cast(crd)) ; } } }