From ff53669ed918c87d15ddea2d07fda84d4c8eff5d Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Wed, 28 Jun 2017 11:39:40 -0700 Subject: Store integer literals at high precision in AST The lexer was creating an `unsigned long long` value, and then the AST was storing it in an `int`. This change makes both use a `long long`. This is obviously still a stopgap until I can get arbitrary precisions in here. --- source/slang/reflection.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/reflection.cpp') diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp index 89fd94093..40cd7061b 100644 --- a/source/slang/reflection.cpp +++ b/source/slang/reflection.cpp @@ -233,7 +233,7 @@ SLANG_API unsigned int spReflectionType_GetRowCount(SlangReflectionType* inType) if(auto matrixType = dynamic_cast(type)) { - return GetIntVal(matrixType->getRowCount()); + return (unsigned int) GetIntVal(matrixType->getRowCount()); } else if(auto vectorType = dynamic_cast(type)) { @@ -254,11 +254,11 @@ SLANG_API unsigned int spReflectionType_GetColumnCount(SlangReflectionType* inTy if(auto matrixType = dynamic_cast(type)) { - return GetIntVal(matrixType->getColumnCount()); + return (unsigned int) GetIntVal(matrixType->getColumnCount()); } else if(auto vectorType = dynamic_cast(type)) { - return GetIntVal(vectorType->elementCount); + return (unsigned int) GetIntVal(vectorType->elementCount); } else if( auto basicType = dynamic_cast(type) ) { -- cgit v1.2.3