|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71191 - trunk/boost/date_time
From: marshall_at_[hidden]
Date: 2011-04-11 14:20:54
Author: marshall
Date: 2011-04-11 14:20:53 EDT (Mon, 11 Apr 2011)
New Revision: 71191
URL: http://svn.boost.org/trac/boost/changeset/71191
Log:
Applied patch; Refs #4870
Text files modified:
trunk/boost/date_time/time_parsing.hpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Modified: trunk/boost/date_time/time_parsing.hpp
==============================================================================
--- trunk/boost/date_time/time_parsing.hpp (original)
+++ trunk/boost/date_time/time_parsing.hpp 2011-04-11 14:20:53 EDT (Mon, 11 Apr 2011)
@@ -153,9 +153,10 @@
std::string& first,
std::string& second)
{
- int sep_pos = static_cast<int>(s.find(sep));
+ std::string::size_type sep_pos = s.find(sep);
first = s.substr(0,sep_pos);
- second = s.substr(sep_pos+1);
+ if (sep_pos!=std::string::npos)
+ second = s.substr(sep_pos+1);
return true;
}
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