Boost logo

Boost-Commit :

From: technews_at_[hidden]
Date: 2008-01-24 01:36:36


Author: turkanis
Date: 2008-01-24 01:36:36 EST (Thu, 24 Jan 2008)
New Revision: 42945
URL: http://svn.boost.org/trac/boost/changeset/42945

Log:
fixed is_open on windows
Text files modified:
   branches/iostreams_dev/libs/iostreams/src/mapped_file.cpp | 9 ++++++---
   1 files changed, 6 insertions(+), 3 deletions(-)

Modified: branches/iostreams_dev/libs/iostreams/src/mapped_file.cpp
==============================================================================
--- branches/iostreams_dev/libs/iostreams/src/mapped_file.cpp (original)
+++ branches/iostreams_dev/libs/iostreams/src/mapped_file.cpp 2008-01-24 01:36:36 EST (Thu, 24 Jan 2008)
@@ -123,9 +123,6 @@
 mapped_file_source::size_type mapped_file_source::size() const
 { return pimpl_->size_; }
 
-bool mapped_file_source::is_open() const
-{ return !!pimpl_ && pimpl_->handle_ != 0; }
-
 void mapped_file_source::close() { pimpl_->close(); }
 
 mapped_file_source::operator mapped_file_source::safe_bool() const
@@ -283,6 +280,9 @@
     pimpl_->data_ = reinterpret_cast<char*>(data);
 }
 
+bool mapped_file_source::is_open() const
+{ return !!pimpl_ && pimpl_->handle_ != INVALID_HANDLE_VALUE; }
+
 int mapped_file_source::alignment()
 {
     SYSTEM_INFO info;
@@ -368,6 +368,9 @@
     return;
 }
 
+bool mapped_file_source::is_open() const
+{ return !!pimpl_ && pimpl_->handle_ != 0; }
+
 int mapped_file_source::alignment()
 { return static_cast<int>(sysconf(_SC_PAGESIZE)); }
 


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