Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63012 - trunk/boost/units
From: steven_at_[hidden]
Date: 2010-06-15 23:32:18


Author: steven_watanabe
Date: 2010-06-15 23:32:16 EDT (Tue, 15 Jun 2010)
New Revision: 63012
URL: http://svn.boost.org/trac/boost/changeset/63012

Log:
Use long instead of int to match iword and avoid warnings.
Text files modified:
   trunk/boost/units/io.hpp | 6 +++---
   1 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/boost/units/io.hpp
==============================================================================
--- trunk/boost/units/io.hpp (original)
+++ trunk/boost/units/io.hpp 2010-06-15 23:32:16 EDT (Tue, 15 Jun 2010)
@@ -158,18 +158,18 @@
 } // namespace detail
 
 /// \return flags controlling output.
-inline int get_flags(std::ios_base& ios, int mask)
+inline long get_flags(std::ios_base& ios, long mask)
 {
     return(ios.iword(detail::xalloc_key_holder<true>::value) & mask);
 }
 
 /// Set new flags controlling output format.
 /// \return previous flags.
-inline void set_flags(std::ios_base& ios, int new_flags, int mask)
+inline void set_flags(std::ios_base& ios, long new_flags, long mask)
 {
     assert((~mask & new_flags) == 0);
     long& flags = ios.iword(detail::xalloc_key_holder<true>::value);
- flags = (flags & ~mask) | static_cast<long>(new_flags);
+ flags = (flags & ~mask) | new_flags;
 }
 
 /// \return flags controlling output format.


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