Skip to content

Commit

Permalink
fix compile warning(Pull requests #1305)(Issues #1306)
Browse files Browse the repository at this point in the history
  • Loading branch information
RonsonNamek authored and jbeder committed Aug 6, 2024
1 parent 04dddd6 commit 06c3d1d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions include/yaml-cpp/emitterstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
#endif

namespace YAML {
struct EmitterStyle {
enum value { Default, Block, Flow };
};
namespace EmitterStyle {
enum value { Default, Block, Flow };
}

}

#endif // EMITTERSTYLE_H_62B23520_7C8E_11DE_8A39_0800200C9A66
7 changes: 4 additions & 3 deletions include/yaml-cpp/node/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
#endif

namespace YAML {
struct NodeType {
enum value { Undefined, Null, Scalar, Sequence, Map };
};
namespace NodeType {
enum value { Undefined, Null, Scalar, Sequence, Map };
}

}

#endif // VALUE_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66
5 changes: 2 additions & 3 deletions src/singledocparser.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <algorithm>
#include <cstdio>
#include <sstream>

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 06c3d1d

Please sign in to comment.