Several fixes of warnings/clang tidy
This commit is contained in:
parent
2f527a8380
commit
880903db5f
15 changed files with 58 additions and 67 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
using namespace SqlAst;
|
||||
|
||||
Keyword isKeyword(QString symbol)
|
||||
Keyword isKeyword(const QString &symbol)
|
||||
{
|
||||
static std::unordered_map<std::string, Keyword> lookup_map = {
|
||||
{ "as", Keyword::As },
|
||||
|
|
@ -22,8 +22,8 @@ Keyword isKeyword(QString symbol)
|
|||
auto res = lookup_map.find(symbol.toLower().toUtf8().data());
|
||||
if (res != lookup_map.end())
|
||||
return res->second;
|
||||
else
|
||||
return Keyword::NotAKeyword;
|
||||
|
||||
return Keyword::NotAKeyword;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ void SqlParser::parse()
|
|||
// IF NOT try_reduce(token)
|
||||
// THEN SHIFT
|
||||
// END LOOP
|
||||
while (1) {
|
||||
while (true) {
|
||||
SqlToken token = lexer.nextBasicToken();
|
||||
if (token.ok) {
|
||||
if (token.tokenType == BasicTokenType::Symbol) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue