From 5d7324a30cd319a817c61e3b00bc52fb6c2f85c6 Mon Sep 17 00:00:00 2001 From: Cameron Ross Date: Sun, 17 Mar 2019 19:59:35 -0300 Subject: [PATCH] fix some Exception constructors incorrectly using uint for line numbers instead of size_t --- source/dyaml/constructor.d | 2 +- source/dyaml/node.d | 2 +- source/dyaml/reader.d | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/dyaml/constructor.d b/source/dyaml/constructor.d index b302d21..bc1d75c 100644 --- a/source/dyaml/constructor.d +++ b/source/dyaml/constructor.d @@ -38,7 +38,7 @@ class ConstructorException : YAMLException /// Params: msg = Error message. /// start = Start position of the error context. /// end = End position of the error context. - this(string msg, Mark start, Mark end, string file = __FILE__, int line = __LINE__) + this(string msg, Mark start, Mark end, string file = __FILE__, size_t line = __LINE__) @safe pure nothrow { super(msg ~ "\nstart: " ~ start.toString() ~ "\nend: " ~ end.toString(), diff --git a/source/dyaml/node.d b/source/dyaml/node.d index b7c707c..b1690d2 100644 --- a/source/dyaml/node.d +++ b/source/dyaml/node.d @@ -33,7 +33,7 @@ class NodeException : YAMLException // // Params: msg = Error message. // start = Start position of the node. - this(string msg, Mark start, string file = __FILE__, int line = __LINE__) + this(string msg, Mark start, string file = __FILE__, size_t line = __LINE__) @safe { super(msg ~ "\nNode at: " ~ start.toString(), file, line); diff --git a/source/dyaml/reader.d b/source/dyaml/reader.d index 7acb6a6..d7d28d7 100644 --- a/source/dyaml/reader.d +++ b/source/dyaml/reader.d @@ -34,7 +34,7 @@ package: ///Exception thrown at Reader errors. class ReaderException : YAMLException { - this(string msg, string file = __FILE__, int line = __LINE__) + this(string msg, string file = __FILE__, size_t line = __LINE__) @safe pure nothrow { super("Reader error: " ~ msg, file, line);