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_all.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_all.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/algorithm/string/detail/find_format_all.hpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/3rdParty/Boost/src/boost/algorithm/string/detail/find_format_all.hpp b/3rdParty/Boost/src/boost/algorithm/string/detail/find_format_all.hpp index 36edf56..0f184a3 100644 --- a/3rdParty/Boost/src/boost/algorithm/string/detail/find_format_all.hpp +++ b/3rdParty/Boost/src/boost/algorithm/string/detail/find_format_all.hpp @@ -57,9 +57,9 @@ namespace boost { while( M ) { // Copy the beginning of the sequence - std::copy( LastMatch, M.begin(), Output ); + Output = std::copy( LastMatch, M.begin(), Output ); // 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 ); // Proceed to the next match LastMatch=M.end(); @@ -67,7 +67,7 @@ namespace boost { } // Copy the rest of the sequence - std::copy( LastMatch, ::boost::end(Input), Output ); + Output = std::copy( LastMatch, ::boost::end(Input), Output ); return Output; } @@ -85,6 +85,7 @@ namespace boost { FormatterT Formatter, const FindResultT& FindResult ) { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { return ::boost::algorithm::detail::find_format_all_copy_impl2( Output, Input, @@ -92,6 +93,9 @@ namespace boost { Formatter, FindResult, Formatter(FindResult) ); + } else { + return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); + } } // find_format_all_copy implementation ----------------------------------------------// @@ -156,12 +160,16 @@ namespace boost { FormatterT Formatter, const FindResultT& FindResult) { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { return ::boost::algorithm::detail::find_format_all_copy_impl2( Input, Finder, Formatter, FindResult, Formatter(FindResult) ); + } else { + return Input; + } } // find_format_all implementation ------------------------------------------------// @@ -248,6 +256,7 @@ namespace boost { FormatterT Formatter, FindResultT FindResult) { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { ::boost::algorithm::detail::find_format_all_impl2( Input, Finder, @@ -255,6 +264,7 @@ namespace boost { FindResult, Formatter(FindResult) ); } + } } // namespace detail } // namespace algorithm |