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/xml/XMLErrors.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'Source/WebCore/xml/XMLErrors.h') diff --git a/Source/WebCore/xml/XMLErrors.h b/Source/WebCore/xml/XMLErrors.h index 0032e8426..617ceb02b 100644 --- a/Source/WebCore/xml/XMLErrors.h +++ b/Source/WebCore/xml/XMLErrors.h @@ -26,23 +26,20 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef XMLErrors_h -#define XMLErrors_h +#pragma once +#include #include #include -#include - namespace WebCore { class Document; class XMLErrors { public: - explicit XMLErrors(Document*); + explicit XMLErrors(Document&); - // Exposed for callbacks: enum ErrorType { warning, nonFatal, fatal }; void handleError(ErrorType, const char* message, int lineNumber, int columnNumber); void handleError(ErrorType, const char* message, TextPosition); @@ -52,13 +49,10 @@ public: private: void appendErrorMessage(const String& typeString, TextPosition, const char* message); - Document* m_document; - - int m_errorCount; - TextPosition m_lastErrorPosition; + Document& m_document; + int m_errorCount { 0 }; + std::optional m_lastErrorPosition; StringBuilder m_errorMessages; }; } // namespace WebCore - -#endif // XMLErrors_h -- cgit v1.2.1