diff options
Diffstat (limited to '3rdParty/Boost/src/boost/date_time/format_date_parser.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/date_time/format_date_parser.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/3rdParty/Boost/src/boost/date_time/format_date_parser.hpp b/3rdParty/Boost/src/boost/date_time/format_date_parser.hpp index 21e4a49..a4a4d0d 100644 --- a/3rdParty/Boost/src/boost/date_time/format_date_parser.hpp +++ b/3rdParty/Boost/src/boost/date_time/format_date_parser.hpp @@ -7,7 +7,7 @@ * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst - * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + * $Date: 2009-06-04 04:24:49 -0400 (Thu, 04 Jun 2009) $ */ @@ -100,19 +100,19 @@ template<typename int_type, typename charT> inline int_type var_string_to_int(std::istreambuf_iterator<charT>& itr, - std::istreambuf_iterator<charT>& /* stream_end */, + const std::istreambuf_iterator<charT>& stream_end, unsigned int max_length) { typedef std::basic_string<charT> string_type; unsigned int j = 0; string_type s; - while ((j < max_length) && std::isdigit(*itr)) { + while (itr != stream_end && (j < max_length) && std::isdigit(*itr)) { s += (*itr); - itr++; - j++; + ++itr; + ++j; } int_type i = -1; - if(s.length() != 0) { + if(!s.empty()) { i = boost::lexical_cast<int_type>(s); } return i; |