From f0da88a34428e37be718ae9836233ff38e124f91 Mon Sep 17 00:00:00 2001 From: Teus Benschop Date: Sun, 21 Apr 2024 13:11:01 +0200 Subject: [PATCH] Import original pugixml library again... ... leaving out the changes in the namespace statements made in the last few days. --- pugixml/pugixml.cpp | 18 +++++++++--------- pugixml/utils.cpp | 7 +------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/pugixml/pugixml.cpp b/pugixml/pugixml.cpp index b6d262b2b..f1a6c7e04 100644 --- a/pugixml/pugixml.cpp +++ b/pugixml/pugixml.cpp @@ -2386,7 +2386,7 @@ PUGI__NS_BEGIN } template - PUGI__FN bool strcpy_insitu(std::string& dest, Header& header, uintptr_t header_mask, const char_t* source, size_t source_length) + PUGI__FN bool strcpy_insitu(String& dest, Header& header, uintptr_t header_mask, const char_t* source, size_t source_length) { if (source_length == 0) { @@ -4420,7 +4420,7 @@ PUGI__NS_BEGIN } template - PUGI__FN void node_copy_string(std::string& dest, Header& header, uintptr_t header_mask, char_t* source, Header& source_header, xml_allocator* alloc) + PUGI__FN void node_copy_string(String& dest, Header& header, uintptr_t header_mask, char_t* source, Header& source_header, xml_allocator* alloc) { assert(!dest && (header & header_mask) == 0); @@ -4680,7 +4680,7 @@ PUGI__NS_BEGIN // set value with conversion functions template - PUGI__FN bool set_value_ascii(std::string& dest, Header& header, uintptr_t header_mask, char* buf) + PUGI__FN bool set_value_ascii(String& dest, Header& header, uintptr_t header_mask, char* buf) { #ifdef PUGIXML_WCHAR_MODE char_t wbuf[128]; @@ -4696,7 +4696,7 @@ PUGI__NS_BEGIN } template - PUGI__FN bool set_value_integer(std::string& dest, Header& header, uintptr_t header_mask, U value, bool negative) + PUGI__FN bool set_value_integer(String& dest, Header& header, uintptr_t header_mask, U value, bool negative) { char_t buf[64]; char_t* end = buf + sizeof(buf) / sizeof(buf[0]); @@ -4706,7 +4706,7 @@ PUGI__NS_BEGIN } template - PUGI__FN bool set_value_convert(std::string& dest, Header& header, uintptr_t header_mask, float value, int precision) + PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, float value, int precision) { char buf[128]; PUGI__SNPRINTF(buf, "%.*g", precision, double(value)); @@ -4715,7 +4715,7 @@ PUGI__NS_BEGIN } template - PUGI__FN bool set_value_convert(std::string& dest, Header& header, uintptr_t header_mask, double value, int precision) + PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, double value, int precision) { char buf[128]; PUGI__SNPRINTF(buf, "%.*g", precision, value); @@ -4724,7 +4724,7 @@ PUGI__NS_BEGIN } template - PUGI__FN bool set_value_bool(std::string& dest, Header& header, uintptr_t header_mask, bool value) + PUGI__FN bool set_value_bool(String& dest, Header& header, uintptr_t header_mask, bool value) { return strcpy_insitu(dest, header, header_mask, value ? PUGIXML_TEXT("true") : PUGIXML_TEXT("false"), value ? 4 : 5); } @@ -9599,7 +9599,7 @@ PUGI__NS_BEGIN ast_func_namespace_uri_1, // namespace-uri(left) ast_func_name_0, // name() ast_func_name_1, // name(left) - ast_func_string_0, // std::string() + ast_func_string_0, // string() ast_func_string_1, // string(left) ast_func_concat, // concat(left, right, siblings) ast_func_starts_with, // starts_with(left, right) @@ -12042,7 +12042,7 @@ PUGI__NS_BEGIN // PathExpr begins with either LocationPath or FilterExpr. // FilterExpr begins with PrimaryExpr // PrimaryExpr begins with '$' in case of it being a variable reference, - // '(' in case of it being an expression, std::string literal, number constant or + // '(' in case of it being an expression, string literal, number constant or // function call. if (_lexer.current() == lex_var_ref || _lexer.current() == lex_open_brace || _lexer.current() == lex_quoted_string || _lexer.current() == lex_number || diff --git a/pugixml/utils.cpp b/pugixml/utils.cpp index fe8da4798..20629ba77 100644 --- a/pugixml/utils.cpp +++ b/pugixml/utils.cpp @@ -25,20 +25,15 @@ #pragma GCC diagnostic ignored "-Wsuggest-override" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #ifndef HAVE_PUGIXML -#ifndef HAVE_PUGIXML #include #endif #ifdef HAVE_PUGIXML #include #endif -#endif -#ifdef HAVE_PUGIXML -#include -#endif #pragma GCC diagnostic pop -void pugixml_utils_error_logger (void * pugi_xml_parse_result, const std::string& xml) +void pugixml_utils_error_logger (void * pugi_xml_parse_result, const std::string & xml) { pugi::xml_parse_result * result = static_cast(pugi_xml_parse_result); if (result->status == pugi::status_ok) return;