Changeset 138 for trunk/src/io
- Timestamp:
- 06/29/13 19:02:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/io/std_stream.cc
r135 r138 9 9 #include "nv/io/std_stream.hh" 10 10 #include <algorithm> 11 #include <cstring> // TODO: remove, see below12 11 13 12 using namespace nv; 14 13 15 std_stream ::std_stream( stream* source, bool owner /*= false*/, std::size_t bsize /*= 256*/, std::size_t put_back /*= 8 */ )14 std_streambuf::std_streambuf( stream* source, bool owner /*= false*/, std::size_t bsize /*= 256*/, std::size_t put_back /*= 8 */ ) 16 15 : m_stream( source ) 17 16 , m_owner( owner ) … … 23 22 } 24 23 25 std_stream ::~std_stream()24 std_streambuf::~std_streambuf() 26 25 { 27 26 if ( m_owner ) … … 31 30 } 32 31 33 std_stream ::int_type std_stream::underflow()32 std_streambuf::int_type std_streambuf::underflow() 34 33 { 35 34 if (gptr() < egptr()) … … 45 44 { 46 45 // Make arrangements for putback characters 47 // TODO: std::copy( egptr() - m_put_back, egptr(), base ); instead? 48 std::memmove(base, egptr() - m_put_back, m_put_back); 46 std::copy( egptr() - m_put_back, egptr(), base ); 49 47 start += m_put_back; 50 48 }
Note: See TracChangeset
for help on using the changeset viewer.