Index: boost/property_tree/detail/exception_implementation.hpp =================================================================== --- boost/property_tree/detail/exception_implementation.hpp (revision 60623) +++ boost/property_tree/detail/exception_implementation.hpp (working copy) @@ -30,8 +30,8 @@ /////////////////////////////////////////////////////////////////////////// // ptree_error - inline ptree_error::ptree_error(const std::string &what): - std::runtime_error(what) + inline ptree_error::ptree_error(const std::string &p_what): + std::runtime_error(p_what) { } @@ -43,8 +43,8 @@ // ptree_bad_data template inline - ptree_bad_data::ptree_bad_data(const std::string &what, const D &data): - ptree_error(what), m_data(data) + ptree_bad_data::ptree_bad_data(const std::string &p_what, const D &p_data): + ptree_error(p_what), m_data(p_data) { } @@ -62,8 +62,8 @@ // ptree_bad_path template inline - ptree_bad_path::ptree_bad_path(const std::string &what, const P &path): - ptree_error(detail::prepare_bad_path_what(what, path)), m_path(path) + ptree_bad_path::ptree_bad_path(const std::string &p_what, const P &p_path): + ptree_error(detail::prepare_bad_path_what(p_what, p_path)), m_path(p_path) { } Index: boost/property_tree/detail/file_parser_error.hpp =================================================================== --- boost/property_tree/detail/file_parser_error.hpp (revision 60623) +++ boost/property_tree/detail/file_parser_error.hpp (working copy) @@ -26,11 +26,11 @@ // Construction & destruction // Construct error - file_parser_error(const std::string &message, - const std::string &filename, - unsigned long line) : - ptree_error(format_what(message, filename, line)), - m_message(message), m_filename(filename), m_line(line) + file_parser_error(const std::string &p_message, + const std::string &p_filename, + unsigned long p_line) : + ptree_error(format_what(p_message, p_filename, p_line)), + m_message(p_message), m_filename(p_filename), m_line(p_line) { } Index: boost/property_tree/detail/rapidxml.hpp =================================================================== --- boost/property_tree/detail/rapidxml.hpp (revision 60623) +++ boost/property_tree/detail/rapidxml.hpp (working copy) @@ -50,9 +50,9 @@ public: //! Constructs parse error - parse_error(const char *what, void *where) - : m_what(what) - , m_where(where) + parse_error(const char *p_what, void *p_where) + : m_what(p_what) + , m_where(p_where) { } @@ -688,18 +688,18 @@ //! Use name(const Ch *) function to have the length automatically calculated (string must be zero terminated). //! \param name Name of node to set. Does not have to be zero terminated. //! \param size Size of name, in characters. This does not include zero terminator, if one is present. - void name(const Ch *name, std::size_t size) + void name(const Ch *p_name, std::size_t size) { - m_name = const_cast(name); + m_name = const_cast(p_name); m_name_size = size; } //! Sets name of node to a zero-terminated string. //! See also \ref ownership_of_strings and xml_node::name(const Ch *, std::size_t). //! \param name Name of node to set. Must be zero terminated. - void name(const Ch *name) + void name(const Ch *p_name) { - this->name(name, internal::measure(name)); + this->name(p_name, internal::measure(p_name)); } //! Sets value of node to a non zero-terminated string. @@ -718,18 +718,18 @@ //! If you want to manipulate data of elements using values, use parser flag rapidxml::parse_no_data_nodes to prevent creation of data nodes by the parser. //! \param value value of node to set. Does not have to be zero terminated. //! \param size Size of value, in characters. This does not include zero terminator, if one is present. - void value(const Ch *value, std::size_t size) + void value(const Ch *p_value, std::size_t size) { - m_value = const_cast(value); + m_value = const_cast(p_value); m_value_size = size; } //! Sets value of node to a zero-terminated string. //! See also \ref ownership_of_strings and xml_node::value(const Ch *, std::size_t). //! \param value Vame of node to set. Must be zero terminated. - void value(const Ch *value) + void value(const Ch *p_value) { - this->value(value, internal::measure(value)); + this->value(p_value, internal::measure(p_value)); } /////////////////////////////////////////////////////////////////////////// @@ -803,14 +803,14 @@ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters //! \return Pointer to found attribute, or 0 if not found. - xml_attribute *previous_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + xml_attribute *previous_attribute(const Ch *p_name = 0, std::size_t p_name_size = 0, bool case_sensitive = true) const { - if (name) + if (p_name) { - if (name_size == 0) - name_size = internal::measure(name); + if (p_name_size == 0) + p_name_size = internal::measure(p_name); for (xml_attribute *attribute = m_prev_attribute; attribute; attribute = attribute->m_prev_attribute) - if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + if (internal::compare(attribute->name(), attribute->name_size(), p_name, p_name_size, case_sensitive)) return attribute; return 0; } @@ -823,14 +823,14 @@ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters //! \return Pointer to found attribute, or 0 if not found. - xml_attribute *next_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + xml_attribute *next_attribute(const Ch *p_name = 0, std::size_t p_name_size = 0, bool case_sensitive = true) const { - if (name) + if (p_name) { - if (name_size == 0) - name_size = internal::measure(name); + if (p_name_size == 0) + p_name_size = internal::measure(p_name); for (xml_attribute *attribute = m_next_attribute; attribute; attribute = attribute->m_next_attribute) - if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + if (internal::compare(attribute->name(), attribute->name_size(), p_name, p_name_size, case_sensitive)) return attribute; return 0; } @@ -868,8 +868,8 @@ //! Constructs an empty node with the specified type. //! Consider using memory_pool of appropriate document to allocate nodes manually. //! \param type Type of node to construct. - xml_node(node_type type) - : m_type(type) + xml_node(node_type p_type) + : m_type(p_type) , m_first_node(0) , m_first_attribute(0) { @@ -903,14 +903,14 @@ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters //! \return Pointer to found child, or 0 if not found. - xml_node *first_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + xml_node *first_node(const Ch *p_name = 0, std::size_t p_name_size = 0, bool case_sensitive = true) const { - if (name) + if (p_name) { - if (name_size == 0) - name_size = internal::measure(name); + if (p_name_size == 0) + p_name_size = internal::measure(p_name); for (xml_node *child = m_first_node; child; child = child->next_sibling()) - if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive)) + if (internal::compare(child->name(), child->name_size(), p_name, p_name_size, case_sensitive)) return child; return 0; } @@ -925,15 +925,15 @@ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters //! \return Pointer to found child, or 0 if not found. - xml_node *last_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + xml_node *last_node(const Ch *p_name = 0, std::size_t p_name_size = 0, bool case_sensitive = true) const { assert(m_first_node); // Cannot query for last child if node has no children - if (name) + if (p_name) { - if (name_size == 0) - name_size = internal::measure(name); + if (p_name_size == 0) + p_name_size = internal::measure(p_name); for (xml_node *child = m_last_node; child; child = child->previous_sibling()) - if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive)) + if (internal::compare(child->name(), child->name_size(), p_name, p_name_size, case_sensitive)) return child; return 0; } @@ -948,15 +948,15 @@ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters //! \return Pointer to found sibling, or 0 if not found. - xml_node *previous_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + xml_node *previous_sibling(const Ch *p_name = 0, std::size_t p_name_size = 0, bool case_sensitive = true) const { assert(this->m_parent); // Cannot query for siblings if node has no parent - if (name) + if (p_name) { - if (name_size == 0) - name_size = internal::measure(name); + if (p_name_size == 0) + p_name_size = internal::measure(p_name); for (xml_node *sibling = m_prev_sibling; sibling; sibling = sibling->m_prev_sibling) - if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive)) + if (internal::compare(sibling->name(), sibling->name_size(), p_name, p_name_size, case_sensitive)) return sibling; return 0; } @@ -971,15 +971,15 @@ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters //! \return Pointer to found sibling, or 0 if not found. - xml_node *next_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + xml_node *next_sibling(const Ch *p_name = 0, std::size_t p_name_size = 0, bool case_sensitive = true) const { assert(this->m_parent); // Cannot query for siblings if node has no parent - if (name) + if (p_name) { - if (name_size == 0) - name_size = internal::measure(name); + if (p_name_size == 0) + p_name_size = internal::measure(p_name); for (xml_node *sibling = m_next_sibling; sibling; sibling = sibling->m_next_sibling) - if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive)) + if (internal::compare(sibling->name(), sibling->name_size(), p_name, p_name_size, case_sensitive)) return sibling; return 0; } @@ -992,14 +992,14 @@ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters //! \return Pointer to found attribute, or 0 if not found. - xml_attribute *first_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + xml_attribute *first_attribute(const Ch *p_name = 0, std::size_t p_name_size = 0, bool case_sensitive = true) const { - if (name) + if (p_name) { - if (name_size == 0) - name_size = internal::measure(name); + if (p_name_size == 0) + p_name_size = internal::measure(p_name); for (xml_attribute *attribute = m_first_attribute; attribute; attribute = attribute->m_next_attribute) - if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + if (internal::compare(attribute->name(), attribute->name_size(), p_name, p_name_size, case_sensitive)) return attribute; return 0; } @@ -1012,14 +1012,14 @@ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters //! \return Pointer to found attribute, or 0 if not found. - xml_attribute *last_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + xml_attribute *last_attribute(const Ch *p_name = 0, std::size_t p_name_size = 0, bool case_sensitive = true) const { - if (name) + if (p_name) { - if (name_size == 0) - name_size = internal::measure(name); + if (p_name_size == 0) + p_name_size = internal::measure(p_name); for (xml_attribute *attribute = m_last_attribute; attribute; attribute = attribute->m_prev_attribute) - if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + if (internal::compare(attribute->name(), attribute->name_size(), p_name, p_name_size, case_sensitive)) return attribute; return 0; } @@ -1032,9 +1032,9 @@ //! Sets type of node. //! \param type Type of node to set. - void type(node_type type) + void type(node_type p_type) { - m_type = type; + m_type = p_type; } /////////////////////////////////////////////////////////////////////////// @@ -1757,7 +1757,7 @@ } // Remember value start - Ch *value = text; + Ch *text_value = text; // Skip until end of comment while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>')) @@ -1769,7 +1769,7 @@ // Create comment node xml_node *comment = this->allocate_node(node_comment); - comment->value(value, text - value); + comment->value(text_value, text - text_value); // Place zero terminator after comment value if (!(Flags & parse_no_string_terminators)) @@ -1784,7 +1784,7 @@ xml_node *parse_doctype(Ch *&text) { // Remember value start - Ch *value = text; + Ch *text_value = text; // Skip to > while (*text != Ch('>')) @@ -1806,6 +1806,7 @@ case Ch('['): ++depth; break; case Ch(']'): --depth; break; case 0: BOOST_PROPERTY_TREE_RAPIDXML_PARSE_ERROR("unexpected end of data", text); + default: break; } ++text; } @@ -1828,7 +1829,7 @@ { // Create a new doctype node xml_node *doctype = this->allocate_node(node_doctype); - doctype->value(value, text - value); + doctype->value(text_value, text - text_value); // Place zero terminator after value if (!(Flags & parse_no_string_terminators)) @@ -1856,17 +1857,17 @@ xml_node *pi = this->allocate_node(node_pi); // Extract PI target name - Ch *name = text; + Ch *text_name = text; skip(text); - if (text == name) + if (text == text_name) BOOST_PROPERTY_TREE_RAPIDXML_PARSE_ERROR("expected PI target", text); - pi->name(name, text - name); + pi->name(text_name, text - text_name); // Skip whitespace between pi target and pi skip(text); // Remember start of pi - Ch *value = text; + Ch *text_value = text; // Skip to '?>' while (text[0] != Ch('?') || text[1] != Ch('>')) @@ -1877,7 +1878,7 @@ } // Set pi value (verbatim, no entity expansion or whitespace normalization) - pi->value(value, text - value); + pi->value(text_value, text - text_value); // Place zero terminator after name and value if (!(Flags & parse_no_string_terminators)) @@ -1914,7 +1915,7 @@ text = contents_start; // Skip until end of data - Ch *value = text, *end; + Ch *text_value = text, *end; if (Flags & parse_normalize_whitespace) end = skip_and_expand_character_refs(text); else @@ -1942,14 +1943,14 @@ if (!(Flags & parse_no_data_nodes)) { xml_node *data = this->allocate_node(node_data); - data->value(value, end - value); + data->value(text_value, end - text_value); node->append_node(data); } // Add data to parent node if no data exists yet if (!(Flags & parse_no_element_values)) if (*node->value() == Ch('\0')) - node->value(value, end - value); + node->value(text_value, end - text_value); // Place zero terminator after value if (!(Flags & parse_no_string_terminators)) @@ -1982,7 +1983,7 @@ } // Skip until end of cdata - Ch *value = text; + Ch *text_value = text; while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>')) { if (!text[0]) @@ -1992,7 +1993,7 @@ // Create new cdata node xml_node *cdata = this->allocate_node(node_cdata); - cdata->value(value, text - value); + cdata->value(text_value, text - text_value); // Place zero terminator after value if (!(Flags & parse_no_string_terminators)) @@ -2010,11 +2011,11 @@ xml_node *element = this->allocate_node(node_element); // Extract element name - Ch *name = text; + Ch *text_name = text; skip(text); - if (text == name) + if (text == text_name) BOOST_PROPERTY_TREE_RAPIDXML_PARSE_ERROR("expected element name", text); - element->name(name, text - name); + element->name(text_name, text - text_name); // Skip whitespace between element name and attributes or > skip(text); @@ -2115,7 +2116,10 @@ text += 9; // skip '!DOCTYPE ' return parse_doctype(text); } + break; + default: break; + } // switch // Attempt to skip other, unrecognized node types starting with (text); - if (text == name) - BOOST_PROPERTY_TREE_RAPIDXML_PARSE_ERROR("expected attribute name", name); + if (text == text_name) + BOOST_PROPERTY_TREE_RAPIDXML_PARSE_ERROR("expected attribute name", text_name); // Create new attribute xml_attribute *attribute = this->allocate_attribute(); - attribute->name(name, text - name); + attribute->name(text_name, text - text_name); node->append_attribute(attribute); // Skip whitespace after attribute name @@ -2244,7 +2248,7 @@ ++text; // Extract attribute value and expand char refs in it - Ch *value = text, *end; + Ch *text_value = text, *end; const int AttFlags = Flags & ~parse_normalize_whitespace; // No whitespace normalization in attributes if (quote == Ch('\'')) end = skip_and_expand_character_refs, attribute_value_pure_pred, AttFlags>(text); @@ -2252,7 +2256,7 @@ end = skip_and_expand_character_refs, attribute_value_pure_pred, AttFlags>(text); // Set attribute value - attribute->value(value, end - value); + attribute->value(text_value, end - text_value); // Make sure that end quote is present if (*text != quote) Index: boost/property_tree/detail/ptree_implementation.hpp =================================================================== --- boost/property_tree/detail/ptree_implementation.hpp (revision 60623) +++ boost/property_tree/detail/ptree_implementation.hpp (working copy) @@ -185,8 +185,8 @@ } template inline - basic_ptree::basic_ptree(const data_type &data) - : m_data(data), m_children(new typename subs::base_container) + basic_ptree::basic_ptree(const data_type &p_data) + : m_data(p_data), m_children(new typename subs::base_container) { } Index: boost/property_tree/detail/xml_parser_error.hpp =================================================================== --- boost/property_tree/detail/xml_parser_error.hpp (revision 60623) +++ boost/property_tree/detail/xml_parser_error.hpp (working copy) @@ -20,10 +20,10 @@ class xml_parser_error: public file_parser_error { public: - xml_parser_error(const std::string &message, - const std::string &filename, - unsigned long line): - file_parser_error(message, filename, line) + xml_parser_error(const std::string &p_message, + const std::string &p_filename, + unsigned long p_line): + file_parser_error(p_message, p_filename, p_line) { } }; Index: boost/property_tree/detail/xml_parser_writer_settings.hpp =================================================================== --- boost/property_tree/detail/xml_parser_writer_settings.hpp (revision 60623) +++ boost/property_tree/detail/xml_parser_writer_settings.hpp (working copy) @@ -35,12 +35,12 @@ class xml_writer_settings { public: - xml_writer_settings(Ch indent_char = Ch(' '), - typename std::basic_string::size_type indent_count = 0, - const std::basic_string &encoding = widen("utf-8")) - : indent_char(indent_char) - , indent_count(indent_count) - , encoding(encoding) + xml_writer_settings(Ch p_indent_char = Ch(' '), + typename std::basic_string::size_type p_indent_count = 0, + const std::basic_string &p_encoding = widen("utf-8")) + : indent_char(p_indent_char) + , indent_count(p_indent_count) + , encoding(p_encoding) { }