summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/parser/HTMLInputStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/parser/HTMLInputStream.h')
-rw-r--r--Source/WebCore/html/parser/HTMLInputStream.h22
1 files changed, 9 insertions, 13 deletions
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 <wtf/text/TextPosition.h>
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