Skip to content

Commit

Permalink
Fix readability-redundant-string-cstr clang-tidy warning
Browse files Browse the repository at this point in the history
Signed-off-by: Azat Khuzhin <[email protected]>
  • Loading branch information
azat committed May 9, 2023
1 parent d03ae2a commit 0610865
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Parsers/Access/ParserCreateQuotaQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace
{
for (auto qt : collections::range(QuotaType::MAX))
{
if (ParserKeyword{QuotaTypeInfo::get(qt).keyword.c_str()}.ignore(pos, expected))
if (ParserKeyword{QuotaTypeInfo::get(qt).keyword}.ignore(pos, expected))
{
quota_type = qt;
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/Parsers/Access/ParserDropAccessEntityQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ namespace
for (auto i : collections::range(AccessEntityType::MAX))
{
const auto & type_info = AccessEntityTypeInfo::get(i);
if (ParserKeyword{type_info.name.c_str()}.ignore(pos, expected)
|| (!type_info.alias.empty() && ParserKeyword{type_info.alias.c_str()}.ignore(pos, expected)))
if (ParserKeyword{type_info.name}.ignore(pos, expected)
|| (!type_info.alias.empty() && ParserKeyword{type_info.alias}.ignore(pos, expected)))
{
type = i;
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/Parsers/Access/ParserShowAccessEntitiesQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ namespace
for (auto i : collections::range(AccessEntityType::MAX))
{
const auto & type_info = AccessEntityTypeInfo::get(i);
if (ParserKeyword{type_info.plural_name.c_str()}.ignore(pos, expected)
|| (!type_info.plural_alias.empty() && ParserKeyword{type_info.plural_alias.c_str()}.ignore(pos, expected)))
if (ParserKeyword{type_info.plural_name}.ignore(pos, expected)
|| (!type_info.plural_alias.empty() && ParserKeyword{type_info.plural_alias}.ignore(pos, expected)))
{
type = i;
return true;
Expand Down
8 changes: 4 additions & 4 deletions src/Parsers/Access/ParserShowCreateAccessEntityQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ namespace
for (auto i : collections::range(AccessEntityType::MAX))
{
const auto & type_info = AccessEntityTypeInfo::get(i);
if (ParserKeyword{type_info.name.c_str()}.ignore(pos, expected)
|| (!type_info.alias.empty() && ParserKeyword{type_info.alias.c_str()}.ignore(pos, expected)))
if (ParserKeyword{type_info.name}.ignore(pos, expected)
|| (!type_info.alias.empty() && ParserKeyword{type_info.alias}.ignore(pos, expected)))
{
type = i;
plural = false;
Expand All @@ -37,8 +37,8 @@ namespace
for (auto i : collections::range(AccessEntityType::MAX))
{
const auto & type_info = AccessEntityTypeInfo::get(i);
if (ParserKeyword{type_info.plural_name.c_str()}.ignore(pos, expected)
|| (!type_info.plural_alias.empty() && ParserKeyword{type_info.plural_alias.c_str()}.ignore(pos, expected)))
if (ParserKeyword{type_info.plural_name}.ignore(pos, expected)
|| (!type_info.plural_alias.empty() && ParserKeyword{type_info.plural_alias}.ignore(pos, expected)))
{
type = i;
plural = true;
Expand Down

0 comments on commit 0610865

Please sign in to comment.