Title: [170615] trunk/Source/WTF
- Revision
- 170615
- Author
- [email protected]
- Date
- 2014-06-30 17:00:27 -0700 (Mon, 30 Jun 2014)
Log Message
Make TransformIterator::TransformIterator() take rvalue references
https://bugs.webkit.org/show_bug.cgi?id=134468
Reviewed by Darin Adler.
It's unnecessary to support TransformIterator::TransformIterator() taking const lvalue references
as we only call it with rvalues. As a side benefit, we can use move semantics to initialize the
members of TransformIterator.
* wtf/IteratorAdaptors.h:
(WTF::TransformIterator::TransformIterator): Make constructor take arguments as rvalue references.
(WTF::makeTransformIterator): Substitute std::move() for std::forward().
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (170614 => 170615)
--- trunk/Source/WTF/ChangeLog 2014-06-30 23:39:43 UTC (rev 170614)
+++ trunk/Source/WTF/ChangeLog 2014-07-01 00:00:27 UTC (rev 170615)
@@ -1,3 +1,18 @@
+2014-06-30 Daniel Bates <[email protected]>
+
+ Make TransformIterator::TransformIterator() take rvalue references
+ https://bugs.webkit.org/show_bug.cgi?id=134468
+
+ Reviewed by Darin Adler.
+
+ It's unnecessary to support TransformIterator::TransformIterator() taking const lvalue references
+ as we only call it with rvalues. As a side benefit, we can use move semantics to initialize the
+ members of TransformIterator.
+
+ * wtf/IteratorAdaptors.h:
+ (WTF::TransformIterator::TransformIterator): Make constructor take arguments as rvalue references.
+ (WTF::makeTransformIterator): Substitute std::move() for std::forward().
+
2014-06-30 Alex Christensen <[email protected]>
Reduce dynamic memory allocation in css jit.
Modified: trunk/Source/WTF/wtf/IteratorAdaptors.h (170614 => 170615)
--- trunk/Source/WTF/wtf/IteratorAdaptors.h 2014-06-30 23:39:43 UTC (rev 170614)
+++ trunk/Source/WTF/wtf/IteratorAdaptors.h 2014-07-01 00:00:27 UTC (rev 170615)
@@ -77,7 +77,7 @@
template<typename Transform, typename Iterator>
class TransformIterator {
public:
- TransformIterator(const Transform& transform, const Iterator& iter)
+ TransformIterator(Transform&& transform, Iterator&& iter)
: m_transform(std::move(transform))
, m_iter(std::move(iter))
{
@@ -105,7 +105,7 @@
template<typename Transform, typename Iterator>
inline TransformIterator<Transform, Iterator> makeTransformIterator(Transform&& transform, Iterator&& iter)
{
- return TransformIterator<Transform, Iterator>(std::forward<Transform>(transform), std::forward<Iterator>(iter));
+ return TransformIterator<Transform, Iterator>(std::move(transform), std::move(iter));
}
} // namespace WTF
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes