|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49611 - trunk/boost/date_time
From: andrey.semashev_at_[hidden]
Date: 2008-11-06 10:44:10
Author: andysem
Date: 2008-11-06 10:44:10 EST (Thu, 06 Nov 2008)
New Revision: 49611
URL: http://svn.boost.org/trac/boost/changeset/49611
Log:
Fixed exception handling that led to inefficient code.
Text files modified:
trunk/boost/date_time/time_facet.hpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Modified: trunk/boost/date_time/time_facet.hpp
==============================================================================
--- trunk/boost/date_time/time_facet.hpp (original)
+++ trunk/boost/date_time/time_facet.hpp 2008-11-06 10:44:10 EST (Thu, 06 Nov 2008)
@@ -968,7 +968,7 @@
try {
t_year = this->m_parser.parse_year(sitr, stream_end, s, mr);
}
- catch(std::out_of_range bad_year) { // base class for bad_year exception
+ catch(std::out_of_range& bad_year) { // base class for bad_year exception
if(this->m_sv_parser.match(sitr, stream_end, mr)) {
t = time_type(static_cast<special_values>(mr.current_match));
return sitr;
@@ -989,7 +989,7 @@
try {
t_month = this->m_parser.parse_month(sitr, stream_end, s, mr);
}
- catch(std::out_of_range bad_month) { // base class for bad_month exception
+ catch(std::out_of_range& bad_month) { // base class for bad_month exception
if(this->m_sv_parser.match(sitr, stream_end, mr)) {
t = time_type(static_cast<special_values>(mr.current_match));
return sitr;
@@ -1016,7 +1016,7 @@
try {
wd = this->m_parser.parse_weekday(sitr, stream_end, s, mr);
}
- catch(std::out_of_range bad_weekday) { // base class for bad_weekday exception
+ catch(std::out_of_range& bad_weekday) { // base class for bad_weekday exception
if(this->m_sv_parser.match(sitr, stream_end, mr)) {
t = time_type(static_cast<special_values>(mr.current_match));
return sitr;
@@ -1052,7 +1052,7 @@
try {
t_day = this->m_parser.parse_day_of_month(sitr, stream_end);
}
- catch(std::out_of_range bad_day_of_month) { // base class for exception
+ catch(std::out_of_range& bad_day_of_month) { // base class for exception
match_results mr;
if(this->m_sv_parser.match(sitr, stream_end, mr)) {
t = time_type(static_cast<special_values>(mr.current_match));
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