|
Boost-Commit : |
From: jeff_at_[hidden]
Date: 2007-07-31 00:45:45
Author: jefffaust
Date: 2007-07-31 00:45:45 EDT (Tue, 31 Jul 2007)
New Revision: 7608
URL: http://svn.boost.org/trac/boost/changeset/7608
Log:
minor reordering of logic
Text files modified:
sandbox/explore/boost/explore/stream_container.hpp | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
Modified: sandbox/explore/boost/explore/stream_container.hpp
==============================================================================
--- sandbox/explore/boost/explore/stream_container.hpp (original)
+++ sandbox/explore/boost/explore/stream_container.hpp 2007-07-31 00:45:45 EDT (Tue, 31 Jul 2007)
@@ -129,18 +129,19 @@
std::size_t cur_row = 0;
while( first != last )
{
- if( rows && cur_row++ == rows )
- {
- ostr << std::endl;
- cur_row = 1;
- }
-
// value
f(ostr, *first, state);
+
if( ++first != last )
{
// separation delimiter
ostr << state->separator(depth);
+
+ if( rows && ++cur_row == rows )
+ {
+ ostr << '\n';
+ cur_row = 0;
+ }
}
}
@@ -279,7 +280,7 @@
return detail::manipfunc<const Elem*>(&detail::assoc_endFn, end, depth);
}
- detail::manipfunc<size_t> setrows(std::size_t sz, std::size_t depth = 0)
+ detail::manipfunc<std::size_t> setrows(std::size_t sz, std::size_t depth = 0)
{
return detail::manipfunc<std::size_t>(detail::setrowsFn, sz, depth);
}
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