diff --git a/include/fc/io/buffered_iostream.hpp b/include/fc/io/buffered_iostream.hpp index f1803eb..470b1fd 100644 --- a/include/fc/io/buffered_iostream.hpp +++ b/include/fc/io/buffered_iostream.hpp @@ -38,7 +38,7 @@ namespace fc * This method may block until at least 1 character is * available. */ - char peek()const; + virtual char peek() const; private: std::unique_ptr my; diff --git a/include/fc/io/iostream.hpp b/include/fc/io/iostream.hpp index 582797f..7ec8149 100644 --- a/include/fc/io/iostream.hpp +++ b/include/fc/io/iostream.hpp @@ -30,7 +30,7 @@ namespace fc { **/ istream& read( char* buf, size_t len ); istream& read( const std::shared_ptr& buf, size_t len, size_t offset = 0 ); - char get(); + virtual char get(); }; typedef std::shared_ptr istream_ptr; diff --git a/src/io/fstream.cpp b/src/io/fstream.cpp index b76960c..71af81d 100644 --- a/src/io/fstream.cpp +++ b/src/io/fstream.cpp @@ -74,7 +74,8 @@ namespace fc { } ifstream& ifstream::read( char* buf, size_t len ) { - if( eof() ) FC_THROW_EXCEPTION( eof_exception , ""); + if (eof()) + FC_THROW_EXCEPTION( eof_exception , ""); my->ifs.read(buf,len); if (my->ifs.gcount() < int64_t(len)) FC_THROW_EXCEPTION( eof_exception , "");