Boost logo

Boost-Commit :

From: danny_at_[hidden]
Date: 2008-05-01 11:08:30


Author: dannyh
Date: 2008-05-01 11:08:30 EDT (Thu, 01 May 2008)
New Revision: 44974
URL: http://svn.boost.org/trac/boost/changeset/44974

Log:
small changes to get_stream_state_index.
Text files modified:
   sandbox/explore/boost/explore/stream_state.hpp | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: sandbox/explore/boost/explore/stream_state.hpp
==============================================================================
--- sandbox/explore/boost/explore/stream_state.hpp (original)
+++ sandbox/explore/boost/explore/stream_state.hpp 2008-05-01 11:08:30 EDT (Thu, 01 May 2008)
@@ -26,9 +26,9 @@
         // returns an index into the ios_base container of user-defined data. This will
         // create exactly one index per type T.
         template<typename T>
- int get_stream_state_index(std::ios_base& stream)
+ int get_stream_state_index()
         {
- static int index = stream.xalloc();
+ static int index = std::ios_base::xalloc();
             return index;
         }
 
@@ -36,7 +36,7 @@
         template<typename T>
         void delete_extra_state(std::ios_base::event e, std::ios_base& stream, int arg)
         {
- if( std::ios_base::erase_event == e && arg == get_stream_state_index<T>(stream) )
+ if( std::ios_base::erase_event == e && arg == get_stream_state_index<T>() )
             {
                 delete get_stream_state<T>(stream);
                 stream.pword(arg) = 0;
@@ -52,7 +52,7 @@
     T* get_stream_state(std::ios_base& stream, bool create)
     {
         // grab reserved index
- int index = detail::get_stream_state_index<T>(stream);
+ int index = detail::get_stream_state_index<T>();
 
         // grab state data at that index, casting from void*
         T*& state = reinterpret_cast<T*&>(stream.pword(index));


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