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-token.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-token.cpp')
| -rw-r--r-- | source/slang/slang-token.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/source/slang/slang-token.cpp b/source/slang/slang-token.cpp index a8238eb6c..a7f6d7d62 100644 --- a/source/slang/slang-token.cpp +++ b/source/slang/slang-token.cpp @@ -6,22 +6,7 @@ namespace Slang { -Name* Token::getName() const -{ - return getNameOrNull(); -} - -Name* Token::getNameOrNull() const -{ - switch (type) - { - default: - return nullptr; - case TokenType::Identifier: - return (Name*) ptrValue; - } -} char const* TokenTypeToString(TokenType type) { |
