Commit 04dddd69 authored by Jesse Beder's avatar Jesse Beder
Browse files

Revert "Fix compile warning with -Wshadow"

This reverts commit 1f5e971f.

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.
parent 1f5e971f
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#endif #endif
namespace YAML { namespace YAML {
namespace EmitterStyle { struct EmitterStyle {
enum value { Default, Block, Flow }; enum value { Default, Block, Flow };
}; };
} }
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#endif #endif
namespace YAML { namespace YAML {
namespace NodeType { struct NodeType {
enum value { Undefined, Null, Scalar, Sequence, Map }; enum value { Undefined, Null, Scalar, Sequence, Map };
}; };
} }
......
#include <algorithm>
#include <cstdio> #include <cstdio>
#include <sstream> #include <sstream>
...@@ -92,8 +93,8 @@ void SingleDocParser::HandleNode(EventHandler& eventHandler) { ...@@ -92,8 +93,8 @@ void SingleDocParser::HandleNode(EventHandler& eventHandler) {
// add non-specific tags // add non-specific tags
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.compare("?") == 0 && IsNullString(token.value)) { && tag.compare("?") == 0 && IsNullString(token.value)) {
eventHandler.OnNull(mark, anchor); eventHandler.OnNull(mark, anchor);
m_scanner.pop(); m_scanner.pop();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment