From f3d70425fa339a0d8f39b920235c98280d250bbb Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 29 May 2020 08:36:10 -0400 Subject: Feature/ast syntax standard (#1360) * Small improvements to documentation and code around DiagnosticSink * Made methods/functions in slang-syntax.h be lowerCamel Removed some commented out source (was placed elsewhere in code) * Making AST related methods and function lowerCamel. Made IsLeftValue -> isLeftValue. --- source/slang/slang-reflection.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/slang/slang-reflection.cpp') diff --git a/source/slang/slang-reflection.cpp b/source/slang/slang-reflection.cpp index 23d006b3f..23831d498 100644 --- a/source/slang/slang-reflection.cpp +++ b/source/slang/slang-reflection.cpp @@ -304,7 +304,7 @@ SLANG_API unsigned int spReflectionType_GetFieldCount(SlangReflectionType* inTyp auto declRef = declRefType->declRef; if( auto structDeclRef = declRef.as()) { - return (unsigned int)GetFields(structDeclRef, MemberFilterStyle::Instance).getCount(); + return (unsigned int)getFields(structDeclRef, MemberFilterStyle::Instance).getCount(); } } @@ -323,7 +323,7 @@ SLANG_API SlangReflectionVariable* spReflectionType_GetFieldByIndex(SlangReflect auto declRef = declRefType->declRef; if( auto structDeclRef = declRef.as()) { - auto fields = GetFields(structDeclRef, MemberFilterStyle::Instance); + auto fields = getFields(structDeclRef, MemberFilterStyle::Instance); auto fieldDeclRef = fields[index]; return (SlangReflectionVariable*) fieldDeclRef.getDecl(); } @@ -339,11 +339,11 @@ SLANG_API size_t spReflectionType_GetElementCount(SlangReflectionType* inType) if(auto arrayType = as(type)) { - return arrayType->arrayLength ? (size_t) GetIntVal(arrayType->arrayLength) : 0; + return arrayType->arrayLength ? (size_t) getIntVal(arrayType->arrayLength) : 0; } else if( auto vectorType = as(type)) { - return (size_t) GetIntVal(vectorType->elementCount); + return (size_t) getIntVal(vectorType->elementCount); } return 0; @@ -381,7 +381,7 @@ SLANG_API unsigned int spReflectionType_GetRowCount(SlangReflectionType* inType) if(auto matrixType = as(type)) { - return (unsigned int) GetIntVal(matrixType->getRowCount()); + return (unsigned int) getIntVal(matrixType->getRowCount()); } else if(auto vectorType = as(type)) { @@ -402,11 +402,11 @@ SLANG_API unsigned int spReflectionType_GetColumnCount(SlangReflectionType* inTy if(auto matrixType = as(type)) { - return (unsigned int) GetIntVal(matrixType->getColumnCount()); + return (unsigned int) getIntVal(matrixType->getColumnCount()); } else if(auto vectorType = as(type)) { - return (unsigned int) GetIntVal(vectorType->elementCount); + return (unsigned int) getIntVal(vectorType->elementCount); } else if( auto basicType = as(type) ) { @@ -585,7 +585,7 @@ SLANG_API char const* spReflectionType_GetName(SlangReflectionType* inType) if(decl->hasModifier()) return nullptr; - return getText(declRef.GetName()).begin(); + return getText(declRef.getName()).begin(); } return nullptr; @@ -1498,7 +1498,7 @@ SLANG_API SlangReflectionEntryPoint* spReflection_findEntryPointByName(SlangRefl // TODO: improve on naive linear search for(auto ep : program->entryPoints) { - if(ep->entryPoint.GetName()->text == name) + if(ep->entryPoint.getName()->text == name) { return convert(ep); } -- cgit v1.2.3