Reduce amount of copies for HashedString for improved performance
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <deukhoofd@gmail.com>
This commit is contained in:
2019-06-25 15:18:36 +02:00
parent bace7b294d
commit 48224afe45
13 changed files with 62 additions and 57 deletions

View File

@@ -256,7 +256,7 @@ namespace Porygon::Parser {
case HashedString::ConstHash("while"):
return new SimpleToken(TokenKind::WhileKeyword, start, 5);
default:
return new IdentifierToken(HashedString(s), start, s.length());
return new IdentifierToken(HashedString(new u16string(s)), start, s.length());
}
}