From 2252927c04cc61c95a58cf4c3c47a0aac4b05b61 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Thu, 22 Jun 2017 09:13:10 -0700 Subject: Deprecate xml_document::load(const char*) and xml_node::select_single_node These functions were deprecated via comments in 1.5 but never got the deprecated attribute; now is the time! Using deprecated functions produces a warning; to silence it, this change moves the relevant tests to a separate translation unit that has deprecation disabled. --- src/pugixml.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 4d76bfa..5059c96 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -631,8 +631,8 @@ namespace pugi xpath_node_set select_nodes(const xpath_query& query) const; // (deprecated: use select_node instead) Select single node by evaluating XPath query. - xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const; - xpath_node select_single_node(const xpath_query& query) const; + PUGIXML_DEPRECATED xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const; + PUGIXML_DEPRECATED xpath_node select_single_node(const xpath_query& query) const; #endif @@ -1004,7 +1004,7 @@ namespace pugi #endif // (deprecated: use load_string instead) Load document from zero-terminated string. No encoding conversions are applied. - xml_parse_result load(const char_t* contents, unsigned int options = parse_default); + PUGIXML_DEPRECATED xml_parse_result load(const char_t* contents, unsigned int options = parse_default); // Load document from zero-terminated string. No encoding conversions are applied. xml_parse_result load_string(const char_t* contents, unsigned int options = parse_default); -- cgit v1.2.3