diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/date_time/format_date_parser.hpp | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
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 | 28 |
1 files changed, 11 insertions, 17 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 0c3503f..a40dee6 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: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $ + * $Date$ */ @@ -63,7 +63,7 @@ fixed_string_to_int(std::istreambuf_iterator<charT>& itr, itr++; j++; } - int_type i = -1; + int_type i = static_cast<int_type>(-1); // mr.cache will hold leading zeros. size() tells us when input is too short. if(mr.cache.size() < length) { return i; @@ -111,7 +111,7 @@ var_string_to_int(std::istreambuf_iterator<charT>& itr, ++itr; ++j; } - int_type i = -1; + int_type i = static_cast<int_type>(-1); if(!s.empty()) { i = boost::lexical_cast<int_type>(s); } @@ -271,7 +271,8 @@ class format_date_parser const_itr itr(format_str.begin()); while (itr != format_str.end() && (sitr != stream_end)) { if (*itr == '%') { - itr++; + if ( ++itr == format_str.end()) + break; if (*itr != '%') { switch(*itr) { case 'a': @@ -470,14 +471,14 @@ class format_date_parser // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } - charT current_char = *sitr; short month(0); const_itr itr(format_str.begin()); while (itr != format_str.end() && (sitr != stream_end)) { if (*itr == '%') { - itr++; + if ( ++itr == format_str.end()) + break; if (*itr != '%') { switch(*itr) { case 'b': @@ -485,7 +486,6 @@ class format_date_parser mr = m_month_short_names.match(sitr, stream_end); month = mr.current_match; if (mr.has_remaining()) { - current_char = mr.last_char(); use_current_char = true; } break; @@ -495,7 +495,6 @@ class format_date_parser mr = m_month_long_names.match(sitr, stream_end); month = mr.current_match; if (mr.has_remaining()) { - current_char = mr.last_char(); use_current_char = true; } break; @@ -523,7 +522,6 @@ class format_date_parser itr++; if (use_current_char) { use_current_char = false; - current_char = *sitr; } else { sitr++; @@ -575,14 +573,14 @@ class format_date_parser // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } - charT current_char = *sitr; short wkday(0); const_itr itr(format_str.begin()); while (itr != format_str.end() && (sitr != stream_end)) { if (*itr == '%') { - itr++; + if ( ++itr == format_str.end()) + break; if (*itr != '%') { switch(*itr) { case 'a': @@ -594,7 +592,6 @@ class format_date_parser mr = m_weekday_short_names.match(sitr, stream_end); wkday = mr.current_match; if (mr.has_remaining()) { - current_char = mr.last_char(); use_current_char = true; } break; @@ -608,7 +605,6 @@ class format_date_parser mr = m_weekday_long_names.match(sitr, stream_end); wkday = mr.current_match; if (mr.has_remaining()) { - current_char = mr.last_char(); use_current_char = true; } break; @@ -635,7 +631,6 @@ class format_date_parser itr++; if (use_current_char) { use_current_char = false; - current_char = *sitr; } else { sitr++; @@ -668,14 +663,14 @@ class format_date_parser // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } - charT current_char = *sitr; unsigned short year(0); const_itr itr(format_str.begin()); while (itr != format_str.end() && (sitr != stream_end)) { if (*itr == '%') { - itr++; + if ( ++itr == format_str.end()) + break; if (*itr != '%') { //match_results mr; switch(*itr) { @@ -708,7 +703,6 @@ class format_date_parser itr++; if (use_current_char) { use_current_char = false; - current_char = *sitr; } else { sitr++; |