Fixed a bug on Ubuntu 10.04

This commit is contained in:
Ferdinand Majerech 2012-03-23 19:57:57 +01:00
parent 206499a399
commit fdceb1bdcb
2 changed files with 4 additions and 28 deletions

View file

@ -113,18 +113,6 @@ struct Dumper
}
private:
///Resolver used by default.
static Resolver defaultResolver_;
///Representer used by default.
static Representer defaultRepresenter_;
static this()
{
defaultResolver_ = new Resolver;
defaultRepresenter_ = new Representer;
}
///Resolver to resolve tags.
Resolver resolver_;
///Representer to represent data types.
@ -181,8 +169,8 @@ struct Dumper
///Construct a Dumper writing to a _stream. This is useful to e.g. write to memory.
this(Stream stream)
{
resolver_ = defaultResolver_;
representer_ = defaultRepresenter_;
resolver_ = new Resolver();
representer_ = new Representer();
stream_ = stream;
}

View file

@ -88,18 +88,6 @@ import dyaml.token;
struct Loader
{
private:
///Resolver used by default.
static Resolver defaultResolver_;
///Constructor used by default.
static Constructor defaultConstructor_;
static this()
{
defaultResolver_ = new Resolver;
defaultConstructor_ = new Constructor;
}
///Reads character data from a stream.
Reader reader_;
///Processes character data to YAML tokens.
@ -152,8 +140,8 @@ struct Loader
reader_ = new Reader(stream);
scanner_ = new Scanner(reader_);
parser_ = new Parser(scanner_);
resolver_ = defaultResolver_;
constructor_ = defaultConstructor_;
resolver_ = new Resolver();
constructor_ = new Constructor();
}
catch(YAMLException e)
{