summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-21 15:51:24 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-21 15:51:24 +0000
commitd7ec874b9f5bf8cd02e04df6622b5d01cf6b273c (patch)
tree7941ed4dea7eaaca987b1cb4ac2a1321b65542cf /decoder
parentdb7216516604a6197414f281713a64fefc7221f9 (diff)
vest generate options valgrind fix
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@356 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder')
-rw-r--r--decoder/filelib.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/decoder/filelib.h b/decoder/filelib.h
index 9f6bd0a9..2d347c00 100644
--- a/decoder/filelib.h
+++ b/decoder/filelib.h
@@ -59,9 +59,9 @@ class ReadFile : public BaseFile<std::istream> {
abort();
}
char const* file=filename_.c_str(); // just in case the gzstream keeps using the filename for longer than the constructor, e.g. inflateReset2. warning in valgrind that I'm hoping will disappear - it makes no sense.
- ps_.reset(EndsWith(filename, ".gz") ?
+ ps_=PS(EndsWith(filename, ".gz") ?
static_cast<std::istream*>(new igzstream(file)) :
- static_cast<std::istream*>(new std::ifstream(file)));
+ static_cast<std::istream*>(new std::ifstream(file)));
if (!*ps_) {
std::cerr << "Failed to open " << filename << std::endl;
abort();
@@ -81,7 +81,7 @@ class WriteFile : public BaseFile<std::ostream> {
ps_=PS(&std::cout,file_null_deleter());
} else {
char const* file=filename_.c_str(); // just in case the gzstream keeps using the filename for longer than the constructor, e.g. inflateReset2. warning in valgrind that I'm hoping will disappear - it makes no sense.
- ps_.reset(EndsWith(filename, ".gz") ?
+ ps_=PS(EndsWith(filename, ".gz") ?
static_cast<std::ostream*>(new ogzstream(file)) :
static_cast<std::ostream*>(new std::ofstream(file)));
if (!*ps_) {