From 695c2700de54a5fec72ce7214c137a1dc3a02d7b Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Wed, 9 Aug 2017 10:13:40 -0700 Subject: Major naming overhaul: - `ExpressionSyntaxNode` becomes `Expr` - `StatementSyntaxNode` becomes `Stmt` - `StructSyntaxNode` becomes `StructDecl` - `ProgramSyntaxNode` becomes `ModuleDecl` - `ExpressionType` becomes `Type` - Existing fields names `Type` become `type` - There might be some collateral damage here if there were, e.g., `enum`s named `Type`, but I can live with that for now and fix those up as a I see them --- source/slang/reflection.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/slang/reflection.cpp') diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp index 18cf58a92..13c306d56 100644 --- a/source/slang/reflection.cpp +++ b/source/slang/reflection.cpp @@ -19,12 +19,12 @@ using namespace Slang; // Conversion routines to help with strongly-typed reflection API -static inline ExpressionType* convert(SlangReflectionType* type) +static inline Type* convert(SlangReflectionType* type) { - return (ExpressionType*) type; + return (Type*) type; } -static inline SlangReflectionType* convert(ExpressionType* type) +static inline SlangReflectionType* convert(Type* type) { return (SlangReflectionType*) type; } @@ -80,7 +80,7 @@ static inline SlangReflection* convert(ProgramLayout* program) return (SlangReflection*) program; } -// Type Reflection +// type Reflection SLANG_API SlangTypeKind spReflectionType_GetKind(SlangReflectionType* inType) @@ -145,7 +145,7 @@ SLANG_API SlangTypeKind spReflectionType_GetKind(SlangReflectionType* inType) else if( auto declRefType = type->As() ) { auto declRef = declRefType->declRef; - if( auto structDeclRef = declRef.As() ) + if( auto structDeclRef = declRef.As() ) { return SLANG_TYPE_KIND_STRUCT; } @@ -170,7 +170,7 @@ SLANG_API unsigned int spReflectionType_GetFieldCount(SlangReflectionType* inTyp if(auto declRefType = dynamic_cast(type)) { auto declRef = declRefType->declRef; - if( auto structDeclRef = declRef.As()) + if( auto structDeclRef = declRef.As()) { return GetFields(structDeclRef).Count(); } @@ -189,7 +189,7 @@ SLANG_API SlangReflectionVariable* spReflectionType_GetFieldByIndex(SlangReflect if(auto declRefType = dynamic_cast(type)) { auto declRef = declRefType->declRef; - if( auto structDeclRef = declRef.As()) + if( auto structDeclRef = declRef.As()) { auto fieldDeclRef = GetFields(structDeclRef).ToArray()[index]; return (SlangReflectionVariable*) fieldDeclRef.getDecl(); @@ -424,7 +424,7 @@ SLANG_API SlangReflectionType* spReflectionType_GetResourceResultType(SlangRefle return nullptr; } -// Type Layout Reflection +// type Layout Reflection SLANG_API SlangReflectionType* spReflectionTypeLayout_GetType(SlangReflectionTypeLayout* inTypeLayout) { @@ -754,7 +754,7 @@ SLANG_API void spReflectionEntryPoint_getComputeThreadGroupSize( { // Fall back to the GLSL case, which requires a search over global-scope declarations // to look for anything with the `local_size_*` qualifier - auto module = dynamic_cast(entryPointFunc->ParentDecl); + auto module = dynamic_cast(entryPointFunc->ParentDecl); if (module) { for (auto dd : module->Members) -- cgit v1.2.3