Boost logo

Boost-Commit :

From: technews_at_[hidden]
Date: 2008-01-07 18:04:55


Author: turkanis
Date: 2008-01-07 18:04:55 EST (Mon, 07 Jan 2008)
New Revision: 42594
URL: http://svn.boost.org/trac/boost/changeset/42594

Log:
fixed the bug described in ticket Ticket #1551 (stream_buffer::seekpos ignores openmode parameter)
Text files modified:
   branches/iostreams_dev/boost/iostreams/detail/streambuf/direct_streambuf.hpp | 5 ++---
   branches/iostreams_dev/boost/iostreams/detail/streambuf/indirect_streambuf.hpp | 5 ++---
   2 files changed, 4 insertions(+), 6 deletions(-)

Modified: branches/iostreams_dev/boost/iostreams/detail/streambuf/direct_streambuf.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/detail/streambuf/direct_streambuf.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/detail/streambuf/direct_streambuf.hpp 2008-01-07 18:04:55 EST (Mon, 07 Jan 2008)
@@ -187,10 +187,9 @@
 template<typename T, typename Tr>
 inline typename direct_streambuf<T, Tr>::pos_type
 direct_streambuf<T, Tr>::seekpos
- (pos_type sp, BOOST_IOS::openmode)
+ (pos_type sp, BOOST_IOS::openmode which)
 {
- return seek_impl( position_to_offset(sp), BOOST_IOS::beg,
- BOOST_IOS::in | BOOST_IOS::out );
+ return seek_impl(position_to_offset(sp), BOOST_IOS::beg, which);
 }
 
 template<typename T, typename Tr>

Modified: branches/iostreams_dev/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/detail/streambuf/indirect_streambuf.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/detail/streambuf/indirect_streambuf.hpp 2008-01-07 18:04:55 EST (Mon, 07 Jan 2008)
@@ -332,10 +332,9 @@
 template<typename T, typename Tr, typename Alloc, typename Mode>
 inline typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
 indirect_streambuf<T, Tr, Alloc, Mode>::seekpos
- (pos_type sp, BOOST_IOS::openmode)
+ (pos_type sp, BOOST_IOS::openmode which)
 {
- return seek_impl( position_to_offset(sp), BOOST_IOS::beg,
- BOOST_IOS::in | BOOST_IOS::out );
+ return seek_impl(position_to_offset(sp), BOOST_IOS::beg, which);
 }
 
 template<typename T, typename Tr, typename Alloc, typename Mode>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk