diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-12 06:35:20 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-12 06:35:20 +0400 |
commit | 8e7693076c39a7e81ea090b107323c92024d6f00 (patch) | |
tree | 64b5a6c793485c67071e135e09579d1ba89988e5 /mert/Util.cpp | |
parent | fb3b0f9f62259a6e23b8a2e94484957e38dce335 (diff) |
Add const to stream wrapper classes.
Diffstat (limited to 'mert/Util.cpp')
-rw-r--r-- | mert/Util.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mert/Util.cpp b/mert/Util.cpp index b9077a2f6..cb34829e7 100644 --- a/mert/Util.cpp +++ b/mert/Util.cpp @@ -75,12 +75,11 @@ void Tokenize(const char *str, const char delim, } inputfilestream::inputfilestream(const std::string &filePath) - : std::istream(0), - m_streambuf(0) + : std::istream(0), m_streambuf(0) { // check if file is readable std::filebuf* fb = new std::filebuf(); - _good=(fb->open(filePath.c_str(), std::ios::in)!=NULL); + is_good = (fb->open(filePath.c_str(), std::ios::in) != NULL); if (filePath.size() > 3 && filePath.substr(filePath.size() - 3, 3) == ".gz") { @@ -104,12 +103,11 @@ void inputfilestream::close() } outputfilestream::outputfilestream(const std::string &filePath) - : std::ostream(0), - m_streambuf(0) + : std::ostream(0), m_streambuf(0) { // check if file is readable std::filebuf* fb = new std::filebuf(); - _good=(fb->open(filePath.c_str(), std::ios::out)!=NULL); + is_good = (fb->open(filePath.c_str(), std::ios::out) != NULL); if (filePath.size() > 3 && filePath.substr(filePath.size() - 3, 3) == ".gz") { throw runtime_error("Output to a zipped file not supported!"); |