diff --git a/source/dyaml/emitter.d b/source/dyaml/emitter.d index 9f8e991..fe5d997 100644 --- a/source/dyaml/emitter.d +++ b/source/dyaml/emitter.d @@ -54,7 +54,7 @@ class EmitterException : YAMLException private alias EmitterException Error; //Stores results of analysis of a scalar, determining e.g. what scalar style to use. -align(4) struct ScalarAnalysis +struct ScalarAnalysis { //Scalar itself. string scalar; diff --git a/source/dyaml/event.d b/source/dyaml/event.d index 22c5903..40afe2f 100644 --- a/source/dyaml/event.d +++ b/source/dyaml/event.d @@ -227,8 +227,12 @@ Event scalarEvent(const Mark start, const Mark end, const Anchor anchor, const T result.value = value; result.startMark = start; result.endMark = end; - result.anchor = anchor; - result.tag = tag; + + () @trusted { + result.anchor = anchor; + result.tag = tag; + }(); + result.id = EventID.Scalar; result.scalarStyle = style; result.implicit = implicit[0]; diff --git a/source/dyaml/loader.d b/source/dyaml/loader.d index 1839c82..6d0b811 100644 --- a/source/dyaml/loader.d +++ b/source/dyaml/loader.d @@ -179,7 +179,7 @@ struct Loader * * Throws: YAMLException if yamlData contains data illegal in YAML. */ - this(void[] yamlData) @safe + this(void[] yamlData) @trusted { try { diff --git a/source/dyaml/zerostring.d b/source/dyaml/zerostring.d index 841a097..55f2a32 100644 --- a/source/dyaml/zerostring.d +++ b/source/dyaml/zerostring.d @@ -24,7 +24,7 @@ struct ZeroString(string TypeName) @disable int opCmp(ref ZeroString); ///Construct a string. - this(const string str) pure nothrow @safe + this(const string str) pure nothrow @trusted { if(str is null || str == "") {