clang-tidy: do not use compare
Found with readability-string-compare Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
ab05c7c338
commit
cad14a5926
@ -93,9 +93,9 @@ void SingleDocParser::HandleNode(EventHandler& eventHandler) {
|
||||
// add non-specific tags
|
||||
if (tag.empty())
|
||||
tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
|
||||
|
||||
if (token.type == Token::PLAIN_SCALAR
|
||||
&& tag.compare("?") == 0 && IsNullString(token.value)) {
|
||||
|
||||
if (token.type == Token::PLAIN_SCALAR && tag == "?" &&
|
||||
IsNullString(token.value)) {
|
||||
eventHandler.OnNull(mark, anchor);
|
||||
m_scanner.pop();
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user