From 9eeb67aa3ed1b9ca0a6368d28255509266d84b24 Mon Sep 17 00:00:00 2001 From: Jez Higgins Date: Mon, 14 Dec 2009 22:39:15 +0000 Subject: [PATCH] convert node type from enum to int to silence gcc warning about exceeding the maximum value of the enum --- include/DOM/Node.hpp | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/include/DOM/Node.hpp b/include/DOM/Node.hpp index abec9c18..fda8d844 100644 --- a/include/DOM/Node.hpp +++ b/include/DOM/Node.hpp @@ -3,8 +3,6 @@ //////////////////////////// // C++ DOM definition -// -// $Id$ //////////////////////////// #include #include @@ -30,23 +28,22 @@ template class Node_impl; class Node_base { - public: - enum Type - { - ELEMENT_NODE = 1, - ATTRIBUTE_NODE, - TEXT_NODE, - CDATA_SECTION_NODE, - ENTITY_REFERENCE_NODE, - ENTITY_NODE, - PROCESSING_INSTRUCTION_NODE, - COMMENT_NODE, - DOCUMENT_NODE, - DOCUMENT_TYPE_NODE, - DOCUMENT_FRAGMENT_NODE, - NOTATION_NODE, - MAX_TYPE - }; // Type +public: + typedef int Type; + + static const int ELEMENT_NODE = 1; + static const int ATTRIBUTE_NODE = 2; + static const int TEXT_NODE = 3; + static const int CDATA_SECTION_NODE = 4; + static const int ENTITY_REFERENCE_NODE = 5; + static const int ENTITY_NODE = 6; + static const int PROCESSING_INSTRUCTION_NODE = 7; + static const int COMMENT_NODE = 8; + static const int DOCUMENT_NODE = 9; + static const int DOCUMENT_TYPE_NODE = 10; + static const int DOCUMENT_FRAGMENT_NODE = 11; + static const int NOTATION_NODE = 12; + static const int MAX_TYPE = 13; }; // class Node_base /////////////////////////////////////////////////