projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Possible fix for coverity #29375
[supertux.git]
/
src
/
lisp
/
writer.cpp
diff --git
a/src/lisp/writer.cpp
b/src/lisp/writer.cpp
index
41854d3
..
66728fb
100644
(file)
--- a/
src/lisp/writer.cpp
+++ b/
src/lisp/writer.cpp
@@
-16,20
+16,29
@@
#include "lisp/writer.hpp"
#include "lisp/writer.hpp"
-#include "physfs/
physfs
_stream.hpp"
+#include "physfs/
buffered_ofile
_stream.hpp"
#include "util/log.hpp"
namespace lisp {
#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);
}
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;
{
out = newout;
out_owned = false;