Skip to content

Commit f359277

Browse files
committed
clang-tidy: do not use compare
Found with readability-string-compare Signed-off-by: Rosen Penev <[email protected]>
1 parent 37ef6ec commit f359277

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/singledocparser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ void SingleDocParser::HandleNode(EventHandler& eventHandler) {
9393
// add non-specific tags
9494
if (tag.empty())
9595
tag = (token.type == Token::NON_PLAIN_SCALAR ? "!" : "?");
96-
97-
if (token.type == Token::PLAIN_SCALAR
98-
&& tag.compare("?") == 0 && IsNullString(token.value)) {
96+
97+
if (token.type == Token::PLAIN_SCALAR && tag == "?" &&
98+
IsNullString(token.value)) {
9999
eventHandler.OnNull(mark, anchor);
100100
m_scanner.pop();
101101
return;

0 commit comments

Comments
 (0)