diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-11-24 20:33:19 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-11-24 20:35:17 (GMT) |
commit | 332d60c56dfaa11fdd135088279d15cd5983b3d4 (patch) | |
tree | dd77717a4e1732da929d5ff8a0471fa3f005e201 /3rdParty/Boost/src/boost/algorithm/string/detail/find_format.hpp | |
parent | 90c44a10fec26d2a0935b2d62e82b6a5be028373 (diff) | |
download | swift-contrib-332d60c56dfaa11fdd135088279d15cd5983b3d4.zip swift-contrib-332d60c56dfaa11fdd135088279d15cd5983b3d4.tar.bz2 |
Upgraded Boost to 1.45.0.
Diffstat (limited to '3rdParty/Boost/src/boost/algorithm/string/detail/find_format.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/algorithm/string/detail/find_format.hpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/3rdParty/Boost/src/boost/algorithm/string/detail/find_format.hpp b/3rdParty/Boost/src/boost/algorithm/string/detail/find_format.hpp index 0d8b104..7f5f780 100644 --- a/3rdParty/Boost/src/boost/algorithm/string/detail/find_format.hpp +++ b/3rdParty/Boost/src/boost/algorithm/string/detail/find_format.hpp @@ -49,17 +49,17 @@ namespace boost { if ( !M ) { // Match not found - return original sequence - std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); + Output = std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); return Output; } // Copy the beginning of the sequence - std::copy( ::boost::begin(Input), ::boost::begin(M), Output ); + Output = std::copy( ::boost::begin(Input), ::boost::begin(M), Output ); // Format find result // Copy formated result - std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); + Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); // Copy the rest of the sequence - std::copy( M.end(), ::boost::end(Input), Output ); + Output = std::copy( M.end(), ::boost::end(Input), Output ); return Output; } @@ -75,12 +75,16 @@ namespace boost { FormatterT Formatter, const FindResultT& FindResult ) { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { return ::boost::algorithm::detail::find_format_copy_impl2( Output, Input, Formatter, FindResult, Formatter(FindResult) ); + } else { + return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); + } } @@ -132,11 +136,15 @@ namespace boost { FormatterT Formatter, const FindResultT& FindResult) { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { return ::boost::algorithm::detail::find_format_copy_impl2( Input, Formatter, FindResult, Formatter(FindResult) ); + } else { + return Input; + } } // replace implementation ----------------------------------------------------// @@ -180,12 +188,14 @@ namespace boost { FormatterT Formatter, const FindResultT& FindResult) { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { ::boost::algorithm::detail::find_format_impl2( Input, Formatter, FindResult, Formatter(FindResult) ); } + } } // namespace detail } // namespace algorithm |