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
@ -94,8 +94,8 @@ void SingleDocParser::HandleNode(EventHandler& eventHandler) {
|
|||||||
if (tag.empty())
|
if (tag.empty())
|
||||||
tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
|
tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
|
||||||
|
|
||||||
if (token.type == Token::PLAIN_SCALAR
|
if (token.type == Token::PLAIN_SCALAR && tag == "?" &&
|
||||||
&& tag.compare("?") == 0 && IsNullString(token.value)) {
|
IsNullString(token.value)) {
|
||||||
eventHandler.OnNull(mark, anchor);
|
eventHandler.OnNull(mark, anchor);
|
||||||
m_scanner.pop();
|
m_scanner.pop();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user