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

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Vermeulen <jtv@precisiontranslationtools.com>2015-06-13 17:31:53 +0300
committerJeroen Vermeulen <jtv@precisiontranslationtools.com>2015-06-13 17:31:53 +0300
commitbd86ceffbe6d748a863e15def2443150ca360b38 (patch)
treef9d6df59636c26a0584d7182271621614668ce9b /moses/InputFileStream.h
parent166bf7365f02cf573265d7aded822f0d08215de0 (diff)
Check for error when opening gzfilebuf.
This replaces a segfault when a file can't be found with an exception. Not as helpful as it could be yet, but certainly better than just crashing. Also, make InputFileStream constructor from path "explicit" to avoid mistakes.
Diffstat (limited to 'moses/InputFileStream.h')
-rw-r--r--moses/InputFileStream.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/moses/InputFileStream.h b/moses/InputFileStream.h
index d53abfc23..313ddfed7 100644
--- a/moses/InputFileStream.h
+++ b/moses/InputFileStream.h
@@ -37,7 +37,7 @@ protected:
std::streambuf *m_streambuf;
public:
- InputFileStream(const std::string &filePath);
+ explicit InputFileStream(const std::string &filePath);
~InputFileStream();
void Close();