fix Serializer.this using address of ref parameter

This commit is contained in:
Cameron Ross 2018-04-17 00:43:33 -03:00
parent 4cad68f924
commit 84e850a4af
No known key found for this signature in database
GPG key ID: 777897D98DC91C54
2 changed files with 4 additions and 4 deletions

View file

@ -276,7 +276,7 @@ struct Dumper
try
{
auto emitter = Emitter(stream_, canonical_, indent_, textWidth_, lineBreak_);
auto serializer = Serializer(emitter, resolver_, encoding_, explicitStart_,
auto serializer = Serializer(&emitter, resolver_, encoding_, explicitStart_,
explicitEnd_, YAMLVersion_, tags_);
foreach(ref document; documents)
{

View file

@ -66,12 +66,12 @@ struct Serializer
* YAMLVersion = YAML version string.
* tagDirectives = Tag directives to emit.
*/
this(ref 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) @trusted
TagDirective[] tagDirectives) @safe
{
emitter_ = &emitter;
emitter_ = emitter;
resolver_ = resolver;
explicitStart_ = explicitStart;
explicitEnd_ = explicitEnd;