summaryrefslogtreecommitdiff
path: root/Source/WebCore/xml/XMLErrors.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/xml/XMLErrors.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/xml/XMLErrors.h')
-rw-r--r--Source/WebCore/xml/XMLErrors.h18
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