From 85a0e2c0a38fd9ed47c313e27c87dcc3a713d530 Mon Sep 17 00:00:00 2001 From: Kiith-Sa Date: Wed, 16 Oct 2013 23:16:41 +0200 Subject: [PATCH] Nothrow Node isValid, isScalar, isSequence, isMapping, isUserType, isNull --- source/dyaml/node.d | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/source/dyaml/node.d b/source/dyaml/node.d index 1e5dbea..3a8cf93 100644 --- a/source/dyaml/node.d +++ b/source/dyaml/node.d @@ -463,22 +463,40 @@ struct Node } ///Is this node valid (initialized)? - @property bool isValid() const @safe {return value_.hasValue;} - + @property bool isValid() const @safe pure nothrow + { + return value_.hasValue; + } + ///Is this node a scalar value? - @property bool isScalar() const @safe {return !(isMapping || isSequence);} - + @property bool isScalar() const @safe nothrow + { + return !(isMapping || isSequence); + } + ///Is this node a sequence? - @property bool isSequence() const @safe {return isType!(Node[]);} - + @property bool isSequence() const @safe nothrow + { + return isType!(Node[]); + } + ///Is this node a mapping? - @property bool isMapping() const @safe {return isType!(Pair[]);} + @property bool isMapping() const @safe nothrow + { + return isType!(Pair[]); + } ///Is this node a user defined type? - @property bool isUserType() const @safe {return isType!YAMLObject;} + @property bool isUserType() const @safe nothrow + { + return isType!YAMLObject; + } ///Is this node null? - @property bool isNull() const @safe {return isType!YAMLNull;} + @property bool isNull() const @safe nothrow + { + return isType!YAMLNull; + } ///Return tag of the node. @property string tag() const @safe nothrow {return tag_.get;}