Remove user-defined move constructor and assignment operator from WTF::String

WTF::String can rely on implicit move constructor and assignment
operator as WTF::RefPtr class has them defined now (r177066).

Review URL: https://codereview.chromium.org/367343003

git-svn-id: svn://svn.chromium.org/blink/trunk@178541 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2a63a065
...@@ -123,15 +123,6 @@ public: ...@@ -123,15 +123,6 @@ public:
String(StringImpl* impl) : m_impl(impl) { } String(StringImpl* impl) : m_impl(impl) { }
String(PassRefPtr<StringImpl> impl) : m_impl(impl) { } String(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
// We have to declare the copy constructor and copy assignment operator as well, otherwise
// they'll be implicitly deleted by adding the move constructor and move assignment operator.
String(const String& other) : m_impl(other.m_impl) { }
String(String&& other) : m_impl(other.m_impl.release()) { }
String& operator=(const String& other) { m_impl = other.m_impl; return *this; }
String& operator=(String&& other) { m_impl = other.m_impl.release(); return *this; }
#endif
// Inline the destructor. // Inline the destructor.
ALWAYS_INLINE ~String() { } ALWAYS_INLINE ~String() { }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment