summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/date_time/tz_db_base.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-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/tz_db_base.hpp')
-rw-r--r--3rdParty/Boost/src/boost/date_time/tz_db_base.hpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/date_time/tz_db_base.hpp b/3rdParty/Boost/src/boost/date_time/tz_db_base.hpp
index a6d8ea9..29d6006 100644
--- a/3rdParty/Boost/src/boost/date_time/tz_db_base.hpp
+++ b/3rdParty/Boost/src/boost/date_time/tz_db_base.hpp
@@ -5,7 +5,7 @@
* Subject to the 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-22 09:04:10 -0700 (Sat, 22 Sep 2012) $
+ * $Date$
*/
#include <map>
@@ -180,7 +180,6 @@ namespace boost {
/*! May throw data_not_accessible, or bad_field_count exceptions */
void load_from_file(const std::string& pathspec)
{
- string_type in_str;
std::string buff;
std::ifstream ifs(pathspec.c_str());
@@ -261,8 +260,12 @@ namespace boost {
e_wn = get_week_num(e_nth);
- return new rule_type(start_rule(s_wn, s_d, s_m),
- end_rule(e_wn, e_d, e_m));
+ return new rule_type(start_rule(s_wn,
+ static_cast<unsigned short>(s_d),
+ static_cast<unsigned short>(s_m)),
+ end_rule(e_wn,
+ static_cast<unsigned short>(e_d),
+ static_cast<unsigned short>(e_m)));
}
//! helper function for parse_rules()
week_num get_week_num(int nth) const
@@ -301,7 +304,15 @@ namespace boost {
const char_type sep_char[] = { ';', '\0'};
char_separator_type sep(sep_char);
tokenizer tokens(rule, sep); // 3 fields
-
+
+ if ( std::distance ( tokens.begin(), tokens.end ()) != 3 ) {
+ std::ostringstream msg;
+ msg << "Expecting 3 fields, got "
+ << std::distance ( tokens.begin(), tokens.end ())
+ << " fields in line: " << rule;
+ boost::throw_exception(bad_field_count(msg.str()));
+ }
+
tokenizer_iterator tok_iter = tokens.begin();
nth = std::atoi(tok_iter->c_str()); ++tok_iter;
d = std::atoi(tok_iter->c_str()); ++tok_iter;