Skip to content

Commit

Permalink
clang-tidy: do not use compare
Browse files Browse the repository at this point in the history
Found with readability-string-compare

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Sep 30, 2020
1 parent 37ef6ec commit f359277
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/singledocparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f359277

Please sign in to comment.