Closed GoogleCodeExporter closed 8 years ago
Ok, Should I use isNull? Like
YAML::Node test = node["test"];
if (!test.isNull()) {
// do something with test?
}
Original comment by m...@riedel-privat.de
on 13 Nov 2011 at 8:21
Whoops! This was just a mistake - I seem to have forgotten to implement this. I
added it, r68cecbc525f9.
The proper way to use it is
YAML::Node test = ...
if(test) ...
the check test.IsNull() does something else (a node can be defined but null).
For example:
YAML::Node doc = YAML::Load("test: ~");
assert(doc["test"]);
assert(doc["test"].IsNull());
Nice catch!
Original comment by jbe...@gmail.com
on 13 Nov 2011 at 10:08
Awesome. Thanks for the quick help.
Original comment by m...@riedel-privat.de
on 13 Nov 2011 at 10:31
Original issue reported on code.google.com by
m...@riedel-privat.de
on 13 Nov 2011 at 7:17