summaryrefslogtreecommitdiffstats
path: root/Source/cmXMLWriter.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2015-07-16 19:50:28 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-21 14:11:53 (GMT)
commitdd27e31351be89bc0c28183fc347d6082bca1e36 (patch)
treeb6352d9ae1db24134106c4c242dea1155b6e4254 /Source/cmXMLWriter.cxx
parentcd992170db7a85f00d4ad38f78f0b38c33f83d1f (diff)
downloadCMake-dd27e31351be89bc0c28183fc347d6082bca1e36.zip
CMake-dd27e31351be89bc0c28183fc347d6082bca1e36.tar.gz
CMake-dd27e31351be89bc0c28183fc347d6082bca1e36.tar.bz2
cmXMLWriter: overload Element() method for empty elements
Diffstat (limited to 'Source/cmXMLWriter.cxx')
-rw-r--r--Source/cmXMLWriter.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmXMLWriter.cxx b/Source/cmXMLWriter.cxx
index f9b3b49..ab9939a 100644
--- a/Source/cmXMLWriter.cxx
+++ b/Source/cmXMLWriter.cxx
@@ -67,6 +67,13 @@ void cmXMLWriter::EndElement()
this->ElementOpen = false;
}
+void cmXMLWriter::Element(const char* name)
+{
+ this->CloseStartElement();
+ this->ConditionalLineBreak(!this->IsContent, this->Elements.size());
+ this->Output << '<' << name << "/>";
+}
+
void cmXMLWriter::BreakAttributes()
{
this->BreakAttrib = true;