Modified: trunk/Source/WTF/ChangeLog (157605 => 157606)
--- trunk/Source/WTF/ChangeLog 2013-10-17 22:08:18 UTC (rev 157605)
+++ trunk/Source/WTF/ChangeLog 2013-10-17 22:10:36 UTC (rev 157606)
@@ -1,3 +1,17 @@
+2013-10-17 Geoffrey Garen <[email protected]>
+
+ Tidied up the Vector<T> move constructor
+ https://bugs.webkit.org/show_bug.cgi?id=122998
+
+ Reviewed by Anders Carlsson.
+
+ * wtf/Vector.h:
+ (WTF::::Vector): Don't call swap() "weird". It's the way most std types
+ implement move constructors.
+
+ Do inline this function, so the compiler can optimize away a logical
+ move into a physical no-op.
+
2013-10-16 Filip Pizlo <[email protected]>
Introduce WTF::Bag and start using it for InlineCallFrameSet
Modified: trunk/Source/WTF/wtf/Vector.h (157605 => 157606)
--- trunk/Source/WTF/wtf/Vector.h 2013-10-17 22:08:18 UTC (rev 157605)
+++ trunk/Source/WTF/wtf/Vector.h 2013-10-17 22:10:36 UTC (rev 157606)
@@ -772,15 +772,13 @@
}
template<typename T, size_t inlineCapacity, typename OverflowHandler>
-Vector<T, inlineCapacity, OverflowHandler>::Vector(Vector<T, inlineCapacity, OverflowHandler>&& other)
+inline Vector<T, inlineCapacity, OverflowHandler>::Vector(Vector<T, inlineCapacity, OverflowHandler>&& other)
{
- // It's a little weird to implement a move constructor using swap but this way we
- // don't have to add a move constructor to VectorBuffer.
swap(other);
}
template<typename T, size_t inlineCapacity, typename OverflowHandler>
-Vector<T, inlineCapacity, OverflowHandler>& Vector<T, inlineCapacity, OverflowHandler>::operator=(Vector<T, inlineCapacity, OverflowHandler>&& other)
+inline Vector<T, inlineCapacity, OverflowHandler>& Vector<T, inlineCapacity, OverflowHandler>::operator=(Vector<T, inlineCapacity, OverflowHandler>&& other)
{
swap(other);
return *this;