|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72329 - branches/release/boost/date_time
From: marshall_at_[hidden]
Date: 2011-06-01 11:52:10
Author: marshall
Date: 2011-06-01 11:52:09 EDT (Wed, 01 Jun 2011)
New Revision: 72329
URL: http://svn.boost.org/trac/boost/changeset/72329
Log:
Merge fixes to release; Fixes #2475
Properties modified:
branches/release/boost/date_time/tz_db_base.hpp (contents, props changed)
Text files modified:
branches/release/boost/date_time/tz_db_base.hpp | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
Modified: branches/release/boost/date_time/tz_db_base.hpp
==============================================================================
--- branches/release/boost/date_time/tz_db_base.hpp (original)
+++ branches/release/boost/date_time/tz_db_base.hpp 2011-06-01 11:52:09 EDT (Wed, 01 Jun 2011)
@@ -167,6 +167,16 @@
tz_db_base() {}
//! Process csv data file, may throw exceptions
+ /*! May throw bad_field_count exceptions */
+ void load_from_stream(std::istream &in)
+ {
+ std::string buff;
+ while( std::getline(in, buff)) {
+ parse_string(buff);
+ }
+ }
+
+ //! Process csv data file, may throw exceptions
/*! May throw data_not_accessible, or bad_field_count exceptions */
void load_from_file(const std::string& pathspec)
{
@@ -178,10 +188,7 @@
boost::throw_exception(data_not_accessible(pathspec));
}
std::getline(ifs, buff); // first line is column headings
-
- while( std::getline(ifs, buff)) {
- parse_string(buff);
- }
+ this->load_from_stream(ifs);
}
//! returns true if record successfully added to map
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