From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/html/parser/HTMLInputStream.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'Source/WebCore/html/parser/HTMLInputStream.h') diff --git a/Source/WebCore/html/parser/HTMLInputStream.h b/Source/WebCore/html/parser/HTMLInputStream.h index a7b86b3ba..f86e8f8ad 100644 --- a/Source/WebCore/html/parser/HTMLInputStream.h +++ b/Source/WebCore/html/parser/HTMLInputStream.h @@ -23,11 +23,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef HTMLInputStream_h -#define HTMLInputStream_h +#pragma once -#include "InputStreamPreprocessor.h" #include "SegmentedString.h" +#include namespace WebCore { @@ -56,14 +55,14 @@ public: { } - void appendToEnd(const SegmentedString& string) + void appendToEnd(SegmentedString&& string) { - m_last->append(string); + m_last->append(WTFMove(string)); } - void insertAtCurrentInsertionPoint(const SegmentedString& string) + void insertAtCurrentInsertionPoint(SegmentedString&& string) { - m_first.append(string); + m_first.append(WTFMove(string)); } bool hasInsertionPoint() const @@ -73,7 +72,7 @@ public: void markEndOfFile() { - m_last->append(SegmentedString(String(&kEndOfFileMarker, 1))); + m_last->append(String { &kEndOfFileMarker, 1 }); m_last->close(); } @@ -92,8 +91,7 @@ public: void splitInto(SegmentedString& next) { - next = m_first; - m_first = SegmentedString(); + next = WTFMove(m_first); if (m_last == &m_first) { // We used to only have one SegmentedString in the InputStream // but now we have two. That means m_first is no longer also @@ -154,6 +152,4 @@ private: OrdinalNumber m_column; }; -} - -#endif +} // namespace WebCore -- cgit v1.2.1