diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-05-19 15:37:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-19 15:37:40 -0400 |
| commit | c54c957d2e647d2f9bfdc0bf31561fca5a02c5df (patch) | |
| tree | 8b54c10f40a005fdac0d9837254c430a837a0a3f /source/slang/slang-reflection.cpp | |
| parent | 1de14312917a0427a7a0858615b65261da60f748 (diff) | |
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.
Diffstat (limited to 'source/slang/slang-reflection.cpp')
| -rw-r--r-- | source/slang/slang-reflection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<StringLiteralExpr>(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; } |
