From 32f0a8bd3a5c9f3c454164f4d23289851b0de3e7 Mon Sep 17 00:00:00 2001 From: Steve Doiel Date: Tue, 6 Jan 2015 15:33:56 -0800 Subject: Add xml_text::set for float Make float/double round-trip --- src/pugixml.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pugixml.hpp') diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 917ef4a..8a332e1 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -693,6 +693,7 @@ namespace pugi // Set text with type conversion (numbers are converted to strings, boolean is converted to "true"/"false") bool set(int rhs); bool set(unsigned int rhs); + bool set(float rhs); bool set(double rhs); bool set(bool rhs); -- cgit v1.2.3 From 4ae1940065c415223445efb23d3200d1b0b1d4a1 Mon Sep 17 00:00:00 2001 From: Steve Doiel Date: Fri, 16 Jan 2015 14:55:10 -0800 Subject: Fix attribute round trip for float as well --- src/pugixml.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pugixml.hpp') diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 8a332e1..2076426 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -352,6 +352,7 @@ namespace pugi bool set_value(int rhs); bool set_value(unsigned int rhs); bool set_value(double rhs); + bool set_value(float rhs); bool set_value(bool rhs); #ifdef PUGIXML_HAS_LONG_LONG -- cgit v1.2.3 From 53525a037b45ecf4dc29bf6700ad384647541da2 Mon Sep 17 00:00:00 2001 From: Steve Doiel Date: Fri, 16 Jan 2015 15:20:28 -0800 Subject: Add a couple of more overloads for floats --- src/pugixml.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/pugixml.hpp') diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 2076426..163059d 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -365,6 +365,7 @@ namespace pugi xml_attribute& operator=(int rhs); xml_attribute& operator=(unsigned int rhs); xml_attribute& operator=(double rhs); + xml_attribute& operator=(float rhs); xml_attribute& operator=(bool rhs); #ifdef PUGIXML_HAS_LONG_LONG @@ -708,6 +709,7 @@ namespace pugi xml_text& operator=(int rhs); xml_text& operator=(unsigned int rhs); xml_text& operator=(double rhs); + xml_text& operator=(float rhs); xml_text& operator=(bool rhs); #ifdef PUGIXML_HAS_LONG_LONG -- cgit v1.2.3