From 06324bd5a46d11be7b423f11bb4e3a5da54ce617 Mon Sep 17 00:00:00 2001 From: Ferdinand Majerech Date: Tue, 17 Dec 2013 15:18:03 +0100 Subject: [PATCH] More exception purity. --- source/dyaml/exception.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/dyaml/exception.d b/source/dyaml/exception.d index d1ef78c..1c3d571 100644 --- a/source/dyaml/exception.d +++ b/source/dyaml/exception.d @@ -45,7 +45,7 @@ struct Mark } ///Get a string representation of the mark. - string toString() const @trusted + string toString() const @trusted pure { //Line/column numbers start at zero internally, make them start at 1. string clamped(ushort v){return str(v + 1) ~ (v == ushort.max ? " or higher" : "");} @@ -81,7 +81,7 @@ abstract class MarkedYAMLException : YAMLException template ExceptionCtors() { public this(string msg, string file = __FILE__, int line = __LINE__) - @safe nothrow + @safe pure nothrow { super(msg, file, line); } @@ -92,14 +92,14 @@ template MarkedExceptionCtors() { public: this(string context, Mark contextMark, string problem, Mark problemMark, - string file = __FILE__, int line = __LINE__) @safe + string file = __FILE__, int line = __LINE__) @safe pure { super(context, contextMark, problem, problemMark, file, line); } this(string problem, Mark problemMark, string file = __FILE__, int line = __LINE__) - @safe + @safe pure { super(problem, problemMark, file, line); }