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:
authorHieu Hoang <hieu@hoang.co.uk>2013-05-29 21:16:15 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-05-29 21:16:15 +0400
commit6249432407af8730c10bccc7894c0725fcaf5e47 (patch)
tree3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /mert/GzFileBuf.cpp
parent59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff)
beautify
Diffstat (limited to 'mert/GzFileBuf.cpp')
-rw-r--r--mert/GzFileBuf.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/mert/GzFileBuf.cpp b/mert/GzFileBuf.cpp
index 9d3ccb588..d61a22525 100644
--- a/mert/GzFileBuf.cpp
+++ b/mert/GzFileBuf.cpp
@@ -5,7 +5,8 @@
#include <cstdio>
#include <iostream>
-GzFileBuf::GzFileBuf(const char* filename) {
+GzFileBuf::GzFileBuf(const char* filename)
+{
m_gz_file = gzopen(filename, "rb");
if (m_gz_file == NULL) {
std::cerr << "ERROR: Failed to open " << filename << std::endl;
@@ -16,16 +17,19 @@ GzFileBuf::GzFileBuf(const char* filename) {
m_buf + sizeof(int)); // end position
}
-GzFileBuf::~GzFileBuf() {
+GzFileBuf::~GzFileBuf()
+{
gzclose(m_gz_file);
}
-int GzFileBuf::overflow(int_type c) {
+int GzFileBuf::overflow(int_type c)
+{
throw;
}
// read one character
-int GzFileBuf::underflow() {
+int GzFileBuf::underflow()
+{
// is read position before end of m_buf?
if (gptr() < egptr()) {
return traits_type::to_int_type(*gptr());
@@ -64,17 +68,20 @@ int GzFileBuf::underflow() {
}
std::streampos GzFileBuf::seekpos(
- std::streampos sp,
- std::ios_base::openmode which) {
+ std::streampos sp,
+ std::ios_base::openmode which)
+{
throw;
}
std::streamsize GzFileBuf::xsgetn(char* s,
- std::streamsize num) {
+ std::streamsize num)
+{
return static_cast<std::streamsize>(gzread(m_gz_file,s,num));
}
std::streamsize GzFileBuf::xsputn(const char* s,
- std::streamsize num) {
+ std::streamsize num)
+{
throw;
}