From e816b934195f6418c9fd439f03ae2603a8e0caa0 Mon Sep 17 00:00:00 2001 From: Ferdinand Majerech Date: Thu, 24 Jul 2014 18:41:55 +0200 Subject: [PATCH] More const in exception.d --- source/dyaml/exception.d | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source/dyaml/exception.d b/source/dyaml/exception.d index 7a525ea..dac2db7 100644 --- a/source/dyaml/exception.d +++ b/source/dyaml/exception.d @@ -76,7 +76,7 @@ struct MarkedYAMLExceptionData abstract class MarkedYAMLException : YAMLException { // Construct a MarkedYAMLException with specified context and problem. - this(string context, Mark contextMark, string problem, Mark problemMark, + this(string context, const Mark contextMark, string problem, const Mark problemMark, string file = __FILE__, int line = __LINE__) @safe pure nothrow { const msg = context ~ '\n' ~ @@ -86,7 +86,8 @@ abstract class MarkedYAMLException : YAMLException } // Construct a MarkedYAMLException with specified problem. - this(string problem, Mark problemMark, string file = __FILE__, int line = __LINE__) + this(string problem, const Mark problemMark, + string file = __FILE__, int line = __LINE__) @safe pure nothrow { super(problem ~ '\n' ~ problemMark.toString(), file, line); @@ -117,15 +118,17 @@ template ExceptionCtors() template MarkedExceptionCtors() { public: - this(string context, Mark contextMark, string problem, Mark problemMark, - string file = __FILE__, int line = __LINE__) @safe pure + this(string context, const Mark contextMark, string problem, + const Mark problemMark, string file = __FILE__, int line = __LINE__) + @safe pure nothrow { super(context, contextMark, problem, problemMark, file, line); } - this(string problem, Mark problemMark, string file = __FILE__, int line = __LINE__) - @safe pure + this(string problem, const Mark problemMark, + string file = __FILE__, int line = __LINE__) + @safe pure nothrow { super(problem, problemMark, file, line); }