From 19885eee7b9e39f050ceb3dfb901d44ad1eef5df Mon Sep 17 00:00:00 2001 From: halx99 Date: Sat, 2 Oct 2021 07:54:32 +0800 Subject: [PATCH] Better for boolean value store --- src/pugixml.cpp | 2 +- src/pugixml.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 87cd0dc..15a77c1 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -4703,7 +4703,7 @@ PUGI__NS_BEGIN template 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); + return strcpy_insitu(dest, header, header_mask, value ? PUGIXML_TEXT("true") : PUGIXML_TEXT("false"), value ? 4 : 5, true); } PUGI__FN xml_parse_result load_buffer_impl(xml_document_struct* doc, xml_node_struct* root, void* contents, size_t size, unsigned int options, xml_encoding encoding, bool is_mutable, bool own, char_t** out_buffer) diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 53edae8..8c855f6 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -247,8 +247,8 @@ namespace pugi { bool value; operator bool() const { return value; } }; - static const boolean true_value(true); - static const boolean false_value(false); + static const boolean (true_value)(true); + static const boolean (false_value)(false); } // namespace pugi namespace pugi