summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-16 20:54:58 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-16 20:54:58 -0800
commit550ab4b6356ba203acb6aaebcd3d41acb9e1fa4a (patch)
treeff9bdb4553d7c7c23ecf3e6822d5bd92fdae15fc /src/pugixml.hpp
parentf3e42969a5118247de548c059e9bed69cdf208bb (diff)
parentcf72c20ca173bbad227e8f70bd68a2dbfb5b2890 (diff)
Merge pull request #27 from sdoiel61/master
Make float/double round-trip This change also adds xml_text::set and xml_attribute::set_value overloads for float so that float is only printed using just enough digits to represent float, instead of enough digits to represent double.
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 2432a3f..240b5aa 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
@@ -364,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
@@ -693,6 +695,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);
@@ -706,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