lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master e93045d 1/2: Use xmlwrapp's clear() function


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e93045d 1/2: Use xmlwrapp's clear() function
Date: Thu, 26 Jan 2017 22:38:26 +0000 (UTC)

branch: master
commit e93045d9f37b5b411ace460739658c7dec78efaa
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Use xmlwrapp's clear() function
---
 xml_serialize.hpp |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/xml_serialize.hpp b/xml_serialize.hpp
index bdb44e9..072ead8 100644
--- a/xml_serialize.hpp
+++ b/xml_serialize.hpp
@@ -60,8 +60,7 @@ struct xml_io
 
     static void to_xml(xml::element& e, T const& t)
     {
-        // XMLWRAPP !! Add a clear() function.
-        e.erase(e.begin(), e.end());
+        e.clear();
         // XMLWRAPP !! Someday, this might be rewritten thus:
         //   e.set_content(value_cast<std::string>(t).c_str());
         // but for now that doesn't work with embedded ampersands.
@@ -94,8 +93,7 @@ struct xml_sequence_io
 
     static void to_xml(xml::element& e, T const& t)
     {
-        // XMLWRAPP !! Add a clear() function.
-        e.erase(e.begin(), e.end());
+        e.clear();
         for(auto const& i : t)
             {
             // This is not equivalent to calling set_element():



reply via email to

[Prev in Thread] Current Thread [Next in Thread]