fix Serializer.this using address of ref parameter
This commit is contained in:
parent
4cad68f924
commit
84e850a4af
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue