summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-03 17:26:31 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-03 17:26:31 +0000
commit8a8b2250a8a71135e26a6422edbc3cace10e5a99 (patch)
treead3b8ee5da43823cba9948ce808e14a7c3aa3dfe /libstdc++-v3
parent5e470c4344f67e0e54274c992ef2cfffa5ba7c42 (diff)
downloadppe42-gcc-8a8b2250a8a71135e26a6422edbc3cace10e5a99.tar.gz
ppe42-gcc-8a8b2250a8a71135e26a6422edbc3cace10e5a99.zip
* include/bits/regex_executor.tcc (_Executor<>::_M_main): Move instead
of copying. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@211193 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/bits/regex_executor.tcc6
2 files changed, 8 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index eb23bed260f..55ccdfaa2b5 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,10 @@
2014-06-03 Jonathan Wakely <jwakely@redhat.com>
+ * include/bits/regex_executor.tcc (_Executor<>::_M_main): Move instead
+ of copying.
+
+2014-06-03 Jonathan Wakely <jwakely@redhat.com>
+
Backport from mainline
2014-04-15 Jonathan Wakely <jwakely@redhat.com>
diff --git a/libstdc++-v3/include/bits/regex_executor.tcc b/libstdc++-v3/include/bits/regex_executor.tcc
index 68a5e0490f9..052302b91f7 100644
--- a/libstdc++-v3/include/bits/regex_executor.tcc
+++ b/libstdc++-v3/include/bits/regex_executor.tcc
@@ -120,10 +120,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (_M_match_queue->empty())
break;
_M_visited->assign(_M_visited->size(), false);
- auto _M_old_queue = std::move(*_M_match_queue);
- for (auto __task : _M_old_queue)
+ auto __old_queue = std::move(*_M_match_queue);
+ for (auto& __task : __old_queue)
{
- _M_cur_results = __task.second;
+ _M_cur_results = std::move(__task.second);
_M_dfs<__match_mode>(__task.first);
}
if (!__match_mode)
OpenPOWER on IntegriCloud