simplify Resolver initialization a bit

This commit is contained in:
Cameron Ross 2019-01-24 01:57:50 -04:00 committed by Basile-z
parent 9d83c6a478
commit 780f406e92

View file

@ -33,11 +33,11 @@ final class Resolver
{
private:
// Default tag to use for scalars.
string defaultScalarTag_;
string defaultScalarTag_ = "tag:yaml.org,2002:str";
// Default tag to use for sequences.
string defaultSequenceTag_;
string defaultSequenceTag_ = "tag:yaml.org,2002:seq";
// Default tag to use for mappings.
string defaultMappingTag_;
string defaultMappingTag_ = "tag:yaml.org,2002:map";
/*
* Arrays of scalar resolver tuples indexed by starting character of a scalar.
@ -62,9 +62,6 @@ final class Resolver
this(Flag!"useDefaultImplicitResolvers" defaultImplicitResolvers = Yes.useDefaultImplicitResolvers)
@safe
{
defaultScalarTag_ = "tag:yaml.org,2002:str";
defaultSequenceTag_ = "tag:yaml.org,2002:seq";
defaultMappingTag_ = "tag:yaml.org,2002:map";
if(defaultImplicitResolvers){addImplicitResolvers();}
}