Skip to content

Commit

Permalink
#2175: change Null to BaseNull to avoid shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
cwschilly committed Jan 5, 2024
1 parent 137fa4b commit 0d5e7de
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/yaml-cpp/include/yaml-cpp/null.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inline bool operator!=(const _Null&, const _Null&) { return false; }
YAML_CPP_API bool IsNull(const Node& node); // old API only
YAML_CPP_API bool IsNullString(const std::string& str);

extern YAML_CPP_API _Null Null;
extern YAML_CPP_API _Null BaseNull;
}

#endif // NULL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 changes: 1 addition & 1 deletion lib/yaml-cpp/src/emitfromevents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void EmitFromEvents::OnDocumentEnd() {}
void EmitFromEvents::OnNull(const Mark&, anchor_t anchor) {
BeginNode();
EmitProps("", anchor);
m_emitter << Null;
m_emitter << BaseNull;
}

void EmitFromEvents::OnAlias(const Mark&, anchor_t anchor) {
Expand Down
2 changes: 1 addition & 1 deletion lib/yaml-cpp/src/null.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "yaml-cpp/null.h"

namespace YAML {
_Null Null;
_Null BaseNull;

bool IsNullString(const std::string& str) {
return str.empty() || str == "~" || str == "null" || str == "Null" ||
Expand Down

0 comments on commit 0d5e7de

Please sign in to comment.