Revert "Fix compile warning with -Wshadow"

This reverts commit 1f5e971f77.

See #1306; the previous commit caused an error with -Wpedantic:

yaml-cpp/include/yaml-cpp/emitterstyle.h:13:2: error: extra ‘;’ [-Wpedantic]

Since the original commit was to resolve warnings, reverting and the OP can produce a new one that fixes this issue.
This commit is contained in:
Jesse Beder
2024-08-05 15:50:36 -05:00
parent 1f5e971f77
commit 04dddd6999
3 changed files with 7 additions and 6 deletions

View File

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

View File

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

View File

@@ -1,3 +1,4 @@
#include <algorithm>
#include <cstdio>
#include <sstream>
@@ -92,8 +93,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();