Add the [[unlikely]] attribute to the '\r' case in lexer.cpp

This commit is contained in:
Username404 2021-09-10 22:20:41 +02:00
parent 6de05633d9
commit 84b9f9de73
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ vector<tok> lex(const string& in, const char separatorCharacter)
case DOT: case DOLLAR_SIGN: case SQUOTE:
resVal.emplace_back(static_cast<tok::type>(current), string(1, current), lineNumber); break;
[[likely]] case '\n': ++lineNumber; case ';': resVal.emplace_back(SEPARATOR, string(1, separatorCharacter), lineNumber);
[[likely]] case ' ': case '\t': case '\r': break;
[[likely]] case ' ': case '\t': [[unlikely]] case '\r': break;
default: {
tok::type type = getIdentifierCharType(current);
bool isTypeString = (type == STRING);