diff options
Diffstat (limited to 'Source/WebCore/svg/SVGPathByteStream.h')
-rw-r--r-- | Source/WebCore/svg/SVGPathByteStream.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Source/WebCore/svg/SVGPathByteStream.h b/Source/WebCore/svg/SVGPathByteStream.h index 715285b83..6dbcfb977 100644 --- a/Source/WebCore/svg/SVGPathByteStream.h +++ b/Source/WebCore/svg/SVGPathByteStream.h @@ -17,10 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef SVGPathByteStream_h -#define SVGPathByteStream_h +#pragma once -#if ENABLE(SVG) #include <wtf/Noncopyable.h> #include <wtf/Vector.h> @@ -50,19 +48,30 @@ public: SVGPathByteStream() { } SVGPathByteStream(const Data& data) : m_data(data) { } + + bool operator==(const SVGPathByteStream& other) const + { + return m_data == other.m_data; + } + + bool operator!=(const SVGPathByteStream& other) const + { + return !(*this == other); + } std::unique_ptr<SVGPathByteStream> copy() const { return std::make_unique<SVGPathByteStream>(m_data); } - DataIterator begin() { return m_data.begin(); } - DataIterator end() { return m_data.end(); } + DataIterator begin() const { return m_data.begin(); } + DataIterator end() const { return m_data.end(); } + void append(unsigned char byte) { m_data.append(byte); } - void append(SVGPathByteStream* other) + void append(const SVGPathByteStream& other) { - for (DataIterator it = other->begin(); it != other->end(); ++it) - append(*it); + for (auto stream : other) + append(stream); } void clear() { m_data.clear(); } bool isEmpty() const { return !m_data.size(); } @@ -76,6 +85,3 @@ private: }; } // namespace WebCore - -#endif // ENABLE(SVG) -#endif // SVGPathByteStream_h |