Fix compile warning with -Wshadow

This commit is contained in:
NameSirius
2024-08-05 18:03:37 +08:00
committed by Jesse Beder
parent b11eaf1631
commit 1f5e971f77
3 changed files with 6 additions and 7 deletions

View File

@@ -8,8 +8,8 @@
#endif
namespace YAML {
struct EmitterStyle {
enum value { Default, Block, Flow };
namespace EmitterStyle {
enum value { Default, Block, Flow };
};
}

View File

@@ -8,8 +8,8 @@
#endif
namespace YAML {
struct NodeType {
enum value { Undefined, Null, Scalar, Sequence, Map };
namespace NodeType {
enum value { Undefined, Null, Scalar, Sequence, Map };
};
}

View File

@@ -1,4 +1,3 @@
#include <algorithm>
#include <cstdio>
#include <sstream>
@@ -93,8 +92,8 @@ 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
if (token.type == Token::PLAIN_SCALAR
&& tag.compare("?") == 0 && IsNullString(token.value)) {
eventHandler.OnNull(mark, anchor);
m_scanner.pop();