#include "lisp/writer.hpp"
-#include "physfs/physfs_stream.hpp"
+#include "physfs/buffered_ofile_stream.hpp"
#include "util/log.hpp"
namespace lisp {
-Writer::Writer(const std::string& filename)
+Writer::Writer(const std::string& filename) :
+ out(),
+ out_owned(),
+ indent_depth(),
+ lists()
{
- out = new OFileStream(filename);
+ BufferedOFileStream* filestream = new BufferedOFileStream(filename);
+ out = filestream->get_stream();
out_owned = true;
indent_depth = 0;
out->precision(10);
}
-Writer::Writer(std::ostream* newout)
+Writer::Writer(std::ostream* newout) :
+ out(),
+ out_owned(),
+ indent_depth(),
+ lists()
{
out = newout;
out_owned = false;