diff --git a/src/file.cpp b/src/file.cpp index 89ec83a1..6d94ee51 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -181,7 +181,7 @@ void FileBase::seek(off_t off, int whence) } -off_t FileBase::tell() +off_t FileBase::tell() const { if (!isOpen()) throwIOException("bad tell"); @@ -253,7 +253,7 @@ void InputFile::seek(off_t off, int whence) } -off_t InputFile::tell() +off_t InputFile::tell() const { return super::tell(); } diff --git a/src/file.h b/src/file.h index cc609070..dc49fe1e 100644 --- a/src/file.h +++ b/src/file.h @@ -60,7 +60,7 @@ protected: virtual int readx(void *buf, int len); virtual void write(const void *buf, int len); virtual void seek(off_t off, int whence); - virtual off_t tell(); + virtual off_t tell() const; int _fd; int _flags; @@ -93,7 +93,7 @@ public: virtual int readx(void * buf, int len); virtual void seek(off_t off, int whence); - virtual off_t tell(); + virtual off_t tell() const; };