Skip to content

Commit

Permalink
Revert "Possible fix for coverity #29375"
Browse files Browse the repository at this point in the history
This reverts commit 27b03ae.
It's quite hard to get this working!
  • Loading branch information
tobbi committed Mar 1, 2015
1 parent 204bc2e commit c01aff7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 89 deletions.
5 changes: 2 additions & 3 deletions src/lisp/writer.cpp
Expand Up @@ -16,7 +16,7 @@

#include "lisp/writer.hpp"

#include "physfs/buffered_ofile_stream.hpp"
#include "physfs/ofile_stream.hpp"
#include "util/log.hpp"

namespace lisp {
Expand All @@ -27,8 +27,7 @@ Writer::Writer(const std::string& filename) :
indent_depth(),
lists()
{
BufferedOFileStream* filestream = new BufferedOFileStream(filename);
out = filestream->get_stream();
out = new OFileStream(filename);
out_owned = true;
indent_depth = 0;
out->precision(10);
Expand Down
43 changes: 0 additions & 43 deletions src/physfs/buffered_ofile_stream.cpp

This file was deleted.

39 changes: 0 additions & 39 deletions src/physfs/buffered_ofile_stream.hpp

This file was deleted.

6 changes: 4 additions & 2 deletions src/physfs/ofile_stream.cpp
Expand Up @@ -19,8 +19,10 @@

#include "physfs/ofile_stream.hpp"

OFileStream::OFileStream(OFileStreambuf* buf) :
std::ostream(buf)
#include "physfs/ofile_streambuf.hpp"

OFileStream::OFileStream(const std::string& filename) :
std::ostream(new OFileStreambuf(filename))
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/physfs/ofile_stream.hpp
Expand Up @@ -19,14 +19,14 @@

#include <ostream>
#include <physfs.h>
#include "physfs/ofile_streambuf.hpp"

class OFileStream : public std::ostream
{
public:
OFileStream(OFileStreambuf* buf);
OFileStream(const std::string& filename);
~OFileStream();
};

#endif

/* EOF */

0 comments on commit c01aff7

Please sign in to comment.