|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84068 - in branches/release/boost/archive: . detail impl iterators
From: ramey_at_[hidden]
Date: 2013-04-28 12:07:28
Author: ramey
Date: 2013-04-28 12:07:27 EDT (Sun, 28 Apr 2013)
New Revision: 84068
URL: http://svn.boost.org/trac/boost/changeset/84068
Log:
accumulated changes that effect warnings and performance bug fix
Properties modified:
branches/release/boost/archive/ (props changed)
Text files modified:
branches/release/boost/archive/basic_binary_iprimitive.hpp | 6 +++---
branches/release/boost/archive/binary_iarchive.hpp | 2 +-
branches/release/boost/archive/detail/polymorphic_iarchive_route.hpp | 4 ++--
branches/release/boost/archive/impl/basic_text_iprimitive.ipp | 6 +++---
branches/release/boost/archive/iterators/istream_iterator.hpp | 15 +++++++++++++++
branches/release/boost/archive/iterators/remove_whitespace.hpp | 2 ++
branches/release/boost/archive/iterators/transform_width.hpp | 4 ++--
7 files changed, 28 insertions(+), 11 deletions(-)
Modified: branches/release/boost/archive/basic_binary_iprimitive.hpp
==============================================================================
--- branches/release/boost/archive/basic_binary_iprimitive.hpp (original)
+++ branches/release/boost/archive/basic_binary_iprimitive.hpp 2013-04-28 12:07:27 EDT (Sun, 28 Apr 2013)
@@ -155,18 +155,18 @@
static_cast<std::streamsize>(count / sizeof(Elem))
<= boost::integer_traits<std::streamsize>::const_max
);
- std::size_t s = count / sizeof(Elem);
+ std::streamsize s = static_cast<std::streamsize>(count / sizeof(Elem));
std::streamsize scount = m_sb.sgetn(
static_cast<Elem *>(address),
s
);
- if(scount != static_cast<std::streamsize>(s))
+ if(scount != s)
boost::serialization::throw_exception(
archive_exception(archive_exception::input_stream_error)
);
// note: an optimizer should eliminate the following for char files
BOOST_ASSERT(count % sizeof(Elem) <= boost::integer_traits<std::streamsize>::const_max);
- s = count % sizeof(Elem);
+ s = static_cast<std::streamsize>(count % sizeof(Elem));
if(0 < s){
// if(is.fail())
// boost::serialization::throw_exception(
Modified: branches/release/boost/archive/binary_iarchive.hpp
==============================================================================
--- branches/release/boost/archive/binary_iarchive.hpp (original)
+++ branches/release/boost/archive/binary_iarchive.hpp 2013-04-28 12:07:27 EDT (Sun, 28 Apr 2013)
@@ -29,7 +29,7 @@
namespace archive {
// do not derive from the classes below. If you want to extend this functionality
-// via inhertance, derived from binary_iarchive_impl instead. This will
+// via inhertance, derived from text_iarchive_impl instead. This will
// preserve correct static polymorphism.
// same as binary_iarchive below - without the shared_ptr_helper
Modified: branches/release/boost/archive/detail/polymorphic_iarchive_route.hpp
==============================================================================
--- branches/release/boost/archive/detail/polymorphic_iarchive_route.hpp (original)
+++ branches/release/boost/archive/detail/polymorphic_iarchive_route.hpp 2013-04-28 12:07:27 EDT (Sun, 28 Apr 2013)
@@ -194,10 +194,10 @@
// all current archives take a stream as constructor argument
template <class _Elem, class _Tr>
polymorphic_iarchive_route(
- std::basic_istream<_Elem, _Tr> & bis,
+ std::basic_istream<_Elem, _Tr> & is,
unsigned int flags = 0
) :
- ArchiveImplementation(bis, flags)
+ ArchiveImplementation(is, flags)
{}
virtual ~polymorphic_iarchive_route(){};
};
Modified: branches/release/boost/archive/impl/basic_text_iprimitive.ipp
==============================================================================
--- branches/release/boost/archive/impl/basic_text_iprimitive.ipp (original)
+++ branches/release/boost/archive/impl/basic_text_iprimitive.ipp 2013-04-28 12:07:27 EDT (Sun, 28 Apr 2013)
@@ -13,8 +13,8 @@
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std{
- using ::size_t;
+namespace std{
+ using ::size_t;
} // namespace std
#endif
@@ -30,7 +30,7 @@
#include <boost/archive/iterators/binary_from_base64.hpp>
#include <boost/archive/iterators/transform_width.hpp>
-namespace boost {
+namespace boost {
namespace archive {
namespace {
Modified: branches/release/boost/archive/iterators/istream_iterator.hpp
==============================================================================
--- branches/release/boost/archive/iterators/istream_iterator.hpp (original)
+++ branches/release/boost/archive/iterators/istream_iterator.hpp 2013-04-28 12:07:27 EDT (Sun, 28 Apr 2013)
@@ -54,6 +54,21 @@
return m_istream == rhs.m_istream;
}
+/*
+ //Access the value referred to
+ Elem dereference() const {
+ return m_current_value;
+ }
+
+ void increment(){
+ if(NULL != m_istream){
+ m_current_value = static_cast<Elem>(m_istream->get());
+ if(! m_istream->good()){
+ const_cast<this_t *>(this)->m_istream = NULL;
+ }
+ }
+ }
+*/
//Access the value referred to
Elem dereference() const {
return m_istream->peek();
Modified: branches/release/boost/archive/iterators/remove_whitespace.hpp
==============================================================================
--- branches/release/boost/archive/iterators/remove_whitespace.hpp (original)
+++ branches/release/boost/archive/iterators/remove_whitespace.hpp 2013-04-28 12:07:27 EDT (Sun, 28 Apr 2013)
@@ -143,6 +143,7 @@
public filter_iterator<
remove_whitespace_predicate<
BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type
+ //BOOST_DEDUCED_TYPENAME Base::value_type
>,
Base
>
@@ -151,6 +152,7 @@
typedef filter_iterator<
remove_whitespace_predicate<
BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type
+ //BOOST_DEDUCED_TYPENAME Base::value_type
>,
Base
> super_t;
Modified: branches/release/boost/archive/iterators/transform_width.hpp
==============================================================================
--- branches/release/boost/archive/iterators/transform_width.hpp (original)
+++ branches/release/boost/archive/iterators/transform_width.hpp 2013-04-28 12:07:27 EDT (Sun, 28 Apr 2013)
@@ -119,8 +119,8 @@
transform_width(const transform_width & rhs) :
super_t(rhs.base_reference()),
m_buffer_out_full(rhs.m_buffer_out_full),
- m_buffer_in(rhs.m_buffer_in),
m_remaining_bits(rhs.m_remaining_bits),
+ m_buffer_in(rhs.m_buffer_in),
m_end_of_sequence(false)
{}
};
@@ -148,7 +148,7 @@
// append these bits to the next output
// up to the size of the output
- unsigned int i = (std::min)(missing_bits, m_remaining_bits);
+ unsigned int i = std::min(missing_bits, m_remaining_bits);
// shift interesting bits to least significant position
base_value_type j = m_buffer_in >> (m_remaining_bits - i);
// and mask off the un interesting higher bits
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