lmi
[Top][All Lists]
Advanced

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

Re[2]: [lmi] change file formats to XML


From: Vadim Zeitlin
Subject: Re[2]: [lmi] change file formats to XML
Date: Tue, 16 Mar 2010 15:42:00 +0100

On Tue, 16 Mar 2010 14:29:12 +0100 Vaclav Slavik <address@hidden> wrote:

VS> As for the asymmetry with to_xml(), adding the following to clear the
VS> node would fix it:
VS> 
VS>    e.erase(e.begin(), e.end());
VS>  
VS> If 'e' is empty (as it is), it's a cheap thing to do. Or I could add
VS> xml::node::clear() to xmlwrapp for convenience.

 This is only tangentially related to this thread but I'd just like to cast
my vote for adding clear() because IMO it's much more readable and
especially discoverable than the above.

 And FWIW I also agree with Greg that symmetry would be nice to have here,
at least I can't think of any reason to not want to clear the node in this
code. But I could just be missing something, of course, in which case it'd
be nice if you could explain what it is.

 Thanks,
VZ

reply via email to

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