|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58358 - trunk/boost/archive
From: ramey_at_[hidden]
Date: 2009-12-13 12:43:51
Author: ramey
Date: 2009-12-13 12:43:50 EST (Sun, 13 Dec 2009)
New Revision: 58358
URL: http://svn.boost.org/trac/boost/changeset/58358
Log:
Change code to avoid warning
Text files modified:
trunk/boost/archive/basic_binary_iprimitive.hpp | 5 ++++-
trunk/boost/archive/basic_binary_oprimitive.hpp | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
Modified: trunk/boost/archive/basic_binary_iprimitive.hpp
==============================================================================
--- trunk/boost/archive/basic_binary_iprimitive.hpp (original)
+++ trunk/boost/archive/basic_binary_iprimitive.hpp 2009-12-13 12:43:50 EST (Sun, 13 Dec 2009)
@@ -151,7 +151,10 @@
std::size_t count
){
// note: an optimizer should eliminate the following for char files
- assert(count / sizeof(Elem) <= boost::integer_traits<std::streamsize>::const_max);
+ assert(
+ static_cast<std::streamsize>(count / sizeof(Elem))
+ <= boost::integer_traits<std::streamsize>::const_max
+ );
std::streamsize s = static_cast<std::streamsize>(count / sizeof(Elem));
std::streamsize scount = m_sb.sgetn(
static_cast<Elem *>(address),
Modified: trunk/boost/archive/basic_binary_oprimitive.hpp
==============================================================================
--- trunk/boost/archive/basic_binary_oprimitive.hpp (original)
+++ trunk/boost/archive/basic_binary_oprimitive.hpp 2009-12-13 12:43:50 EST (Sun, 13 Dec 2009)
@@ -160,7 +160,7 @@
// figure number of elements to output - round up
count = ( count + sizeof(Elem) - 1)
/ sizeof(Elem);
- assert(count <= boost::integer_traits<std::streamsize>::const_max);
+ assert(count <= std::size_t(boost::integer_traits<std::streamsize>::const_max));
std::streamsize scount = m_sb.sputn(
static_cast<const Elem *>(address),
static_cast<std::streamsize>(count)
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