Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2018-12-13 03:14:02 +0300
committerMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2018-12-13 03:14:02 +0300
commit8115bcc172f48f6497c4ea202d5ecf4a8f8adac3 (patch)
tree660b8b3799e5c297141a33eb06a55c5a103c093f
parent19cfb307c4e9dec1a5cd1a8b4ea1b6a2aa0948a8 (diff)
fix segfaults on windows version
-rwxr-xr-xsrc/common/file_stream.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/file_stream.h b/src/common/file_stream.h
index 255948f0..9abe7e23 100755
--- a/src/common/file_stream.h
+++ b/src/common/file_stream.h
@@ -178,9 +178,11 @@ public:
bool empty() { return istream_->peek() == std::ifstream::traits_type::eof(); }
void setbufsize(size_t size) const {
+#ifdef 0 // this is buggy, do nothing
istream_->rdbuf()->pubsetbuf(0, 0);
readBuf_.reset(new char[size]);
istream_->rdbuf()->pubsetbuf(readBuf_.get(), 0);
+#endif
}
template <typename T>