add virtual destructor to iseekstream
This commit is contained in:
parent
f165ffbc95
commit
1e23af2adc
@ -19,6 +19,8 @@ namespace utils {
|
|||||||
/*! \brief interface of i/o stream that support seek */
|
/*! \brief interface of i/o stream that support seek */
|
||||||
class ISeekStream: public IStream {
|
class ISeekStream: public IStream {
|
||||||
public:
|
public:
|
||||||
|
// virtual destructor
|
||||||
|
virtual ~ISeekStream(void) {}
|
||||||
/*! \brief seek to certain position of the file */
|
/*! \brief seek to certain position of the file */
|
||||||
virtual void Seek(size_t pos) = 0;
|
virtual void Seek(size_t pos) = 0;
|
||||||
/*! \brief tell the position of the stream */
|
/*! \brief tell the position of the stream */
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class HDFSStream : public utils::ISeekStream {
|
|||||||
bool disconnect_when_done)
|
bool disconnect_when_done)
|
||||||
: fs_(fs), at_end_(false),
|
: fs_(fs), at_end_(false),
|
||||||
disconnect_when_done_(disconnect_when_done) {
|
disconnect_when_done_(disconnect_when_done) {
|
||||||
int flag;
|
int flag = 0;
|
||||||
if (!strcmp(mode, "r")) {
|
if (!strcmp(mode, "r")) {
|
||||||
flag = O_RDONLY;
|
flag = O_RDONLY;
|
||||||
} else if (!strcmp(mode, "w")) {
|
} else if (!strcmp(mode, "w")) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user