summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Doiel <steved@usnr.com>2015-01-16 14:55:10 -0800
committerSteve Doiel <steved@usnr.com>2015-01-16 14:55:10 -0800
commit4ae1940065c415223445efb23d3200d1b0b1d4a1 (patch)
tree465b1895be707a5d05325e1ee50820ada509f326
parent32f0a8bd3a5c9f3c454164f4d23289851b0de3e7 (diff)
Fix attribute round trip for float as well
-rw-r--r--src/pugixml.cpp7
-rw-r--r--src/pugixml.hpp1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 6608d8d..2ed94f3 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -4608,6 +4608,13 @@ namespace pugi
return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);
}
+ PUGI__FN bool xml_attribute::set_value(float rhs)
+ {
+ if (!_attr) return false;
+
+ return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs);
+ }
+
PUGI__FN bool xml_attribute::set_value(bool rhs)
{
if (!_attr) return false;
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