diff --git a/dyaml/constructor.d b/dyaml/constructor.d index f083045..5f13628 100644 --- a/dyaml/constructor.d +++ b/dyaml/constructor.d @@ -428,11 +428,11 @@ long constructLong(ref Node node) //Zero. if(value == "0") {result = cast(long)0;} //Binary. - else if(value.startsWith("0b")){result = sign * parse!int(value[2 .. $], 2);} + else if(value.startsWith("0b")){result = sign * to!int(value[2 .. $], 2);} //Hexadecimal. - else if(value.startsWith("0x")){result = sign * parse!int(value[2 .. $], 16);} + else if(value.startsWith("0x")){result = sign * to!int(value[2 .. $], 16);} //Octal. - else if(value[0] == '0') {result = sign * parse!int(value, 8);} + else if(value[0] == '0') {result = sign * to!int(value, 8);} //Sexagesimal. else if(value.canFind(":")) { diff --git a/dyaml/emitter.d b/dyaml/emitter.d index 70178a2..7e9ccf8 100644 --- a/dyaml/emitter.d +++ b/dyaml/emitter.d @@ -1,4 +1,3 @@ - // Copyright Ferdinand Majerech 2011. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -1585,7 +1584,7 @@ struct ScalarWriter } ///Determine hints (indicators) for block scalar. - size_t determineBlockHints(ref char[] hints, uint bestIndent) const pure @trusted + size_t determineBlockHints(char[] hints, uint bestIndent) const pure @trusted { size_t hintsIdx = 0; if(text_.length == 0){return hintsIdx;} diff --git a/dyaml/reader.d b/dyaml/reader.d index 22f9238..cdc6b2a 100644 --- a/dyaml/reader.d +++ b/dyaml/reader.d @@ -302,7 +302,7 @@ final class Reader try for(size_t c = 0; chars && !decoder_.done;) { const slice = decoder_.getDChars(chars); - buffer_[oldLength + c .. oldLength + c + slice.length] = slice; + buffer_[oldLength + c .. oldLength + c + slice.length] = slice[]; c += slice.length; chars -= slice.length; } @@ -626,7 +626,7 @@ struct UTFBlockDecoder(size_t bufferSize_) if (bufferSize_ % 2 == 0) * * Returns: True if all the characters are printable, false otherwise. */ -bool printable(const ref dchar[] chars) pure @safe nothrow +bool printable(const dchar[] chars) pure @safe nothrow { foreach(c; chars) {