diff options
Diffstat (limited to 'Source/WebCore/xml/XMLErrors.h')
-rw-r--r-- | Source/WebCore/xml/XMLErrors.h | 18 |
1 files changed, 6 insertions, 12 deletions
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 <libxml/parser.h> #include <wtf/text/StringBuilder.h> #include <wtf/text/TextPosition.h> -#include <libxml/parser.h> - 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<TextPosition> m_lastErrorPosition; StringBuilder m_errorMessages; }; } // namespace WebCore - -#endif // XMLErrors_h |