Remove String(RefPtr<StringImpl>) constructor

https://bugs.webkit.org/show_bug.cgi?id=120767

Reviewed by Anders Carlsson.

The String(RefPtr<StringImpl>) constructor should be removed for the following reasons:
- It almost does not have clients, so it is unneeded.
- RefPtr should never be passed by value

* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::shrinkToFit):
* wtf/text/WTFString.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 14f46fda
2013-09-05 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove String(RefPtr<StringImpl>) constructor
https://bugs.webkit.org/show_bug.cgi?id=120767
Reviewed by Anders Carlsson.
The String(RefPtr<StringImpl>) constructor should be removed for the following reasons:
- It almost does not have clients, so it is unneeded.
- RefPtr should never be passed by value
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::shrinkToFit):
* wtf/text/WTFString.h:
2013-09-05 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed. Fix build after r155083
......
......@@ -341,8 +341,7 @@ void StringBuilder::shrinkToFit()
reallocateBuffer<LChar>(m_length);
else
reallocateBuffer<UChar>(m_length);
m_string = m_buffer;
m_buffer = 0;
m_string = m_buffer.release();
}
}
......
......@@ -128,7 +128,6 @@ public:
// Construct a string referencing an existing StringImpl.
String(StringImpl* impl) : m_impl(impl) { }
String(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
String(RefPtr<StringImpl> impl) : m_impl(impl) { }
// Construct a string from a constant string literal.
WTF_EXPORT_STRING_API String(ASCIILiteral characters);
......
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