Merge pull request #29 from soarqin/dmd2067_fix

Fixed compilation for dmd 2.067
This commit is contained in:
Ferdinand Majerech 2015-06-03 20:33:39 +02:00
commit 96f64eb221
6 changed files with 9 additions and 8 deletions

View file

@ -55,13 +55,13 @@ final class Composer
///We need one appender for each nesting level that involves
///a pair array, as the inner levels are processed as a
///part of the outer levels. Used as a stack.
Appender!(Node.Pair[], Node.Pair)[] pairAppenders_;
Appender!(Node.Pair[])[] pairAppenders_;
///Used to reduce allocations when creating node arrays.
///
///We need one appender for each nesting level that involves
///a node array, as the inner levels are processed as a
///part of the outer levels. Used as a stack.
Appender!(Node[], Node)[] nodeAppenders_;
Appender!(Node[])[] nodeAppenders_;
public:
/**

View file

@ -347,7 +347,7 @@ final class Constructor
* ctor = Constructor function.
*/
auto addConstructor(T)(const Tag tag, T function(ref Node) ctor)
@safe pure nothrow
@safe nothrow
{
assert((tag in fromScalar_) is null &&
(tag in fromSequence_) is null &&
@ -859,7 +859,7 @@ struct MyStruct
{
int x, y, z;
const int opCmp(ref const MyStruct s) const pure @safe nothrow
int opCmp(ref const MyStruct s) const pure @safe nothrow
{
if(x != s.x){return x - s.x;}
if(y != s.y){return y - s.y;}

View file

@ -70,7 +70,7 @@ string searchCode(dstring chars, uint tableSize)() @safe pure //nothrow
{
code ~=
q{
static immutable ubyte table_[%s] = [
static immutable ubyte[%s] table_ = [
%s];
}.format(tableSize, table[].map!(c => c ? q{true} : q{false}).join(q{, }));
}

View file

@ -1826,7 +1826,7 @@ package:
//
// Params: pairs = Appender managing the array of pairs to merge into.
// toMerge = Pair to merge.
void merge(ref Appender!(Node.Pair[], Node.Pair) pairs, ref Node.Pair toMerge) @trusted
void merge(ref Appender!(Node.Pair[]) pairs, ref Node.Pair toMerge) @trusted
{
foreach(ref pair; pairs.data)
{
@ -1842,7 +1842,7 @@ void merge(ref Appender!(Node.Pair[], Node.Pair) pairs, ref Node.Pair toMerge) @
//
// Params: pairs = Appender managing the array of pairs to merge into.
// toMerge = Pairs to merge.
void merge(ref Appender!(Node.Pair[], Node.Pair) pairs, Node.Pair[] toMerge) @trusted
void merge(ref Appender!(Node.Pair[]) pairs, Node.Pair[] toMerge) @trusted
{
bool eq(ref Node.Pair a, ref Node.Pair b){return a.key == b.key;}

View file

@ -12,6 +12,7 @@ module dyaml.nogcutil;
import std.traits;
import std.typecons;
import std.typetuple;
import std.range;

View file

@ -602,7 +602,7 @@ struct MyStruct
{
int x, y, z;
const int opCmp(ref const MyStruct s) const pure @safe nothrow
int opCmp(ref const MyStruct s) const pure @safe nothrow
{
if(x != s.x){return x - s.x;}
if(y != s.y){return y - s.y;}