summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/parser/HTMLInputStream.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/parser/HTMLInputStream.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
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