Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72838 - sandbox/gil/boost/gil/extension/io2/detail
From: dsaritz_at_[hidden]
Date: 2011-07-01 17:15:14


Author: psiha
Date: 2011-07-01 17:15:12 EDT (Fri, 01 Jul 2011)
New Revision: 72838
URL: http://svn.boost.org/trac/boost/changeset/72838

Log:
Minor refactoring.
Text files modified:
   sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.cpp | 12 ++++++------
   sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.hpp | 18 +++++++++++-------
   2 files changed, 17 insertions(+), 13 deletions(-)

Modified: sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.cpp
==============================================================================
--- sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.cpp (original)
+++ sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.cpp 2011-07-01 17:15:12 EDT (Fri, 01 Jul 2011)
@@ -119,7 +119,7 @@
 #else
 
     mode_t const current_mask( ::umask( 0 ) );
- int const file_handle( ::open( file_name, flags.oflag, flags.pmode ) );
+ int const file_handle ( ::open( file_name, flags.oflag, flags.pmode ) );
     BOOST_VERIFY( ::umask( current_mask ) == 0 );
 
 #endif // _WIN32
@@ -187,11 +187,11 @@
 
 file_flags file_flags::create
 (
- unsigned int const handle_access_flags ,
- unsigned int const share_mode ,
- open_policy const open_flags ,
- unsigned int const system_hints ,
- unsigned int const on_construction_rights
+ unsigned int const handle_access_flags ,
+ unsigned int const share_mode ,
+ open_policy_t const open_flags ,
+ unsigned int const system_hints ,
+ unsigned int const on_construction_rights
 )
 {
     file_flags const flags =

Modified: sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.hpp
==============================================================================
--- sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.hpp (original)
+++ sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.hpp 2011-07-01 17:15:12 EDT (Fri, 01 Jul 2011)
@@ -60,14 +60,18 @@
         static unsigned int const remove;
     };
 
- enum open_policy
+ struct open_policy
     {
- create_new = BOOST_AUX_IO_WIN32_OR_POSIX( 1, O_CREAT | O_EXCL ),
- create_new_or_truncate_existing = BOOST_AUX_IO_WIN32_OR_POSIX( 2, O_CREAT | O_TRUNC ),
- open_existing = BOOST_AUX_IO_WIN32_OR_POSIX( 3, 0 ),
- open_or_create = BOOST_AUX_IO_WIN32_OR_POSIX( 4, O_CREAT ),
- open_and_truncate_existing = BOOST_AUX_IO_WIN32_OR_POSIX( 5, O_TRUNC )
+ enum value_type
+ {
+ create_new = BOOST_AUX_IO_WIN32_OR_POSIX( 1, O_CREAT | O_EXCL ),
+ create_new_or_truncate_existing = BOOST_AUX_IO_WIN32_OR_POSIX( 2, O_CREAT | O_TRUNC ),
+ open_existing = BOOST_AUX_IO_WIN32_OR_POSIX( 3, 0 ),
+ open_or_create = BOOST_AUX_IO_WIN32_OR_POSIX( 4, O_CREAT ),
+ open_and_truncate_existing = BOOST_AUX_IO_WIN32_OR_POSIX( 5, O_TRUNC )
+ };
     };
+ typedef open_policy::value_type open_policy_t;
 
     struct system_hints
     {
@@ -89,7 +93,7 @@
     (
         unsigned int handle_access_flags ,
         unsigned int share_mode ,
- open_policy ,
+ open_policy_t ,
         unsigned int system_hints ,
         unsigned int on_construction_rights
     );


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