diff --git a/source/dyaml/dumper.d b/source/dyaml/dumper.d index f518c0e..15a47c5 100644 --- a/source/dyaml/dumper.d +++ b/source/dyaml/dumper.d @@ -243,7 +243,7 @@ struct Dumper { try { - auto emitter = new Emitter(stream_, canonical_, indent_, textWidth_, lineBreak_); + auto emitter = Emitter(stream_, canonical_, indent_, textWidth_, lineBreak_); auto serializer = Serializer(emitter, resolver_, encoding_, explicitStart_, explicitEnd_, YAMLVersion_, tags_); foreach(ref document; documents) diff --git a/source/dyaml/queue.d b/source/dyaml/queue.d index 3f090d0..32069ac 100644 --- a/source/dyaml/queue.d +++ b/source/dyaml/queue.d @@ -95,8 +95,6 @@ public: @disable bool opEquals(ref Queue); @disable int opCmp(ref Queue); - @disable this(this); - ~this() @safe nothrow @nogc { freeStock(); diff --git a/source/dyaml/serializer.d b/source/dyaml/serializer.d index bb10390..a108008 100644 --- a/source/dyaml/serializer.d +++ b/source/dyaml/serializer.d @@ -32,7 +32,7 @@ struct Serializer { private: ///Emitter to emit events produced. - Emitter* emitter_; + Emitter emitter_; ///Resolver used to determine which tags are automaticaly resolvable. Resolver resolver_; @@ -66,7 +66,7 @@ struct Serializer * YAMLVersion = YAML version string. * tagDirectives = Tag directives to emit. */ - this(Emitter* emitter, Resolver resolver, Encoding encoding, + this(Emitter emitter, Resolver resolver, Encoding encoding, const Flag!"explicitStart" explicitStart, const Flag!"explicitEnd" explicitEnd, string YAMLVersion, TagDirective[] tagDirectives) @safe