From 989e1b3375b519acbfca19fecdb6ef63277f09ed Mon Sep 17 00:00:00 2001 From: Cameron Ross Date: Sat, 3 Oct 2015 21:52:44 -0300 Subject: [PATCH] avoid use of a static constructor in parser this makes usage in module constructors more reliable and improves consistency with the emitter --- source/dyaml/parser.d | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/dyaml/parser.d b/source/dyaml/parser.d index cc18537..d5714f4 100644 --- a/source/dyaml/parser.d +++ b/source/dyaml/parser.d @@ -114,11 +114,8 @@ final class Parser { private: ///Default tag handle shortcuts and replacements. - static TagDirective[] defaultTagDirectives_; - static this() - { - defaultTagDirectives_ = [TagDirective("!", "!"), TagDirective("!!", "tag:yaml.org,2002:")]; - } + static TagDirective[] defaultTagDirectives_ = + [TagDirective("!", "!"), TagDirective("!!", "tag:yaml.org,2002:")]; ///Scanner providing YAML tokens. Scanner scanner_;