From c54c957d2e647d2f9bfdc0bf31561fca5a02c5df Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 19 May 2020 15:37:40 -0400 Subject: Reduce the size of Token (#1349) * Token size on 64 bits is 24 bytes (from 40). On 32 bits is 16 bytes from 24. * Added hasContent method to Token. Some other small improvements around Token. --- source/slang/slang-reflection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-reflection.cpp') diff --git a/source/slang/slang-reflection.cpp b/source/slang/slang-reflection.cpp index a3cb88892..c0e83ccaf 100644 --- a/source/slang/slang-reflection.cpp +++ b/source/slang/slang-reflection.cpp @@ -183,8 +183,8 @@ SLANG_API const char* spReflectionUserAttribute_GetArgumentValueString(SlangRefl if (auto cexpr = as(userAttr->args[index])) { if (bufLen) - *bufLen = cexpr->token.Content.getLength(); - return cexpr->token.Content.begin(); + *bufLen = cexpr->token.getContentLength(); + return cexpr->token.getContent().begin(); } return nullptr; } -- cgit v1.2.3