From 44e4f173480097087a5bffe7ae72857717f11f45 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 22 Apr 2015 09:51:54 -0700 Subject: Change xml_node_struct field order to match compact Also remove useless comments. --- src/pugixml.cpp | 56 +++++++++++++++++++++++--------------------------------- 1 file changed, 23 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/pugixml.cpp b/src/pugixml.cpp index c5e77e8..b0e0078 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -967,10 +967,8 @@ PUGI__NS_END #ifdef PUGIXML_COMPACT namespace pugi { - /// A 'name=value' XML attribute structure. struct xml_attribute_struct { - /// Default ctor xml_attribute_struct(impl::xml_memory_page* page): header(page, 0) { PUGI__STATIC_ASSERT(sizeof(xml_attribute_struct) == 12); @@ -980,18 +978,15 @@ namespace pugi unsigned char padding; - impl::compact_string<4> name; ///< Pointer to attribute name. - impl::compact_string<7> value; ///< Pointer to attribute value. + impl::compact_string<4> name; + impl::compact_string<7> value; - impl::compact_pointer prev_attribute_c; ///< Previous attribute (cyclic list) - impl::compact_pointer next_attribute; ///< Next attribute + impl::compact_pointer prev_attribute_c; + impl::compact_pointer next_attribute; }; - /// An XML document tree node. struct xml_node_struct { - /// Default ctor - /// \param type - node type xml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(page, type - 1) { PUGI__STATIC_ASSERT(sizeof(xml_node_struct) == 12); @@ -999,16 +994,16 @@ namespace pugi impl::compact_header header; - impl::compact_string<3> contents; ///< Pointer to element name. + impl::compact_string<3> contents; - impl::compact_pointer_parent parent; ///< Pointer to parent + impl::compact_pointer_parent parent; - impl::compact_pointer first_child; ///< First child + impl::compact_pointer first_child; - impl::compact_pointer prev_sibling_c; ///< Left brother (cyclic list) - impl::compact_pointer next_sibling; ///< Right brother + impl::compact_pointer prev_sibling_c; + impl::compact_pointer next_sibling; - impl::compact_pointer first_attribute; ///< First attribute + impl::compact_pointer first_attribute; }; struct xml_node_pi_struct: xml_node_struct @@ -1027,44 +1022,39 @@ namespace pugi #else namespace pugi { - /// A 'name=value' XML attribute structure. struct xml_attribute_struct { - /// Default ctor xml_attribute_struct(impl::xml_memory_page* page): header(reinterpret_cast(page)), name(0), value(0), prev_attribute_c(0), next_attribute(0) { } uintptr_t header; - char_t* name; ///< Pointer to attribute name. - char_t* value; ///< Pointer to attribute value. + char_t* name; + char_t* value; - xml_attribute_struct* prev_attribute_c; ///< Previous attribute (cyclic list) - xml_attribute_struct* next_attribute; ///< Next attribute + xml_attribute_struct* prev_attribute_c; + xml_attribute_struct* next_attribute; }; - /// An XML document tree node. struct xml_node_struct { - /// Default ctor - /// \param type - node type - xml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(reinterpret_cast(page) | (type - 1)), parent(0), contents(0), first_child(0), prev_sibling_c(0), next_sibling(0), first_attribute(0) + xml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(reinterpret_cast(page) | (type - 1)), contents(0), parent(0), first_child(0), prev_sibling_c(0), next_sibling(0), first_attribute(0) { } uintptr_t header; - xml_node_struct* parent; ///< Pointer to parent + char_t* contents; - char_t* contents; ///< Pointer to element name/value + xml_node_struct* parent; - xml_node_struct* first_child; ///< First child - - xml_node_struct* prev_sibling_c; ///< Left brother (cyclic list) - xml_node_struct* next_sibling; ///< Right brother - - xml_attribute_struct* first_attribute; ///< First attribute + xml_node_struct* first_child; + + xml_node_struct* prev_sibling_c; + xml_node_struct* next_sibling; + + xml_attribute_struct* first_attribute; }; struct xml_node_pi_struct: xml_node_struct -- cgit v1.2.3