More useful error messages.

Applied the patch given in jbeder/yaml-cpp#200 with the correct code
style.
This commit is contained in:
Oliver Hamlet
2015-03-31 12:23:02 +01:00
parent 5de38a76b6
commit ec8aa4fa62
10 changed files with 47 additions and 16 deletions

View File

@@ -17,6 +17,7 @@ std::string node_data::empty_scalar;
node_data::node_data()
: m_isDefined(false),
m_mark(Mark::null_mark()),
m_type(NodeType::Null),
m_style(EmitterStyle::Default),
m_seqSize(0) {}
@@ -27,6 +28,10 @@ void node_data::mark_defined() {
m_isDefined = true;
}
void node_data::set_mark(const Mark& mark) {
m_mark = mark;
}
void node_data::set_type(NodeType::value type) {
if (type == NodeType::Undefined) {
m_type = type;