1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-19 01:04:20 +00:00

Minor code clean-ups.

This commit is contained in:
Julian Storer 2010-03-20 21:41:24 +00:00
parent 97e9095933
commit af2137ecaa
11 changed files with 261 additions and 359 deletions

View file

@ -43,8 +43,7 @@ XmlElement::XmlAttributeNode::XmlAttributeNode (const XmlAttributeNode& other) t
{
}
XmlElement::XmlAttributeNode::XmlAttributeNode (const String& name_,
const String& value_) throw()
XmlElement::XmlAttributeNode::XmlAttributeNode (const String& name_, const String& value_) throw()
: name (name_),
value (value_),
next (0)
@ -402,24 +401,11 @@ void XmlElement::writeToStream (OutputStream& output,
const int lineWrapLength) const
{
if (includeXmlHeader)
{
output << "<?xml version=\"1.0\" encoding=\"" << encodingType;
if (allOnOneLine)
output << "\"?> ";
else
output << "\"?>\r\n\r\n";
}
output << "<?xml version=\"1.0\" encoding=\"" << encodingType
<< (allOnOneLine ? "\"?> " : "\"?>\r\n\r\n");
if (dtdToUse.isNotEmpty())
{
output << dtdToUse;
if (allOnOneLine)
output << " ";
else
output << "\r\n";
}
output << dtdToUse << (allOnOneLine ? " " : "\r\n");
writeElementAsText (output, allOnOneLine ? -1 : 0, lineWrapLength);
}