upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)

This commit is contained in:
Alex Birch
2019-06-22 20:41:38 +01:00
parent d22c2cd4fa
commit 9ee566b251
1140 changed files with 67534 additions and 105952 deletions

View File

@ -127,10 +127,10 @@ XmlElement& XmlElement::operator= (const XmlElement& other)
}
XmlElement::XmlElement (XmlElement&& other) noexcept
: nextListItem (static_cast<LinkedListPointer<XmlElement>&&> (other.nextListItem)),
firstChildElement (static_cast<LinkedListPointer<XmlElement>&&> (other.firstChildElement)),
attributes (static_cast<LinkedListPointer<XmlAttributeNode>&&> (other.attributes)),
tagName (static_cast<String&&> (other.tagName))
: nextListItem (std::move (other.nextListItem)),
firstChildElement (std::move (other.firstChildElement)),
attributes (std::move (other.attributes)),
tagName (std::move (other.tagName))
{
}
@ -141,10 +141,10 @@ XmlElement& XmlElement::operator= (XmlElement&& other) noexcept
removeAllAttributes();
deleteAllChildElements();
nextListItem = static_cast<LinkedListPointer<XmlElement>&&> (other.nextListItem);
firstChildElement = static_cast<LinkedListPointer<XmlElement>&&> (other.firstChildElement);
attributes = static_cast<LinkedListPointer<XmlAttributeNode>&&> (other.attributes);
tagName = static_cast<String&&> (other.tagName);
nextListItem = std::move (other.nextListItem);
firstChildElement = std::move (other.firstChildElement);
attributes = std::move (other.attributes);
tagName = std::move (other.tagName);
return *this;
}
@ -241,7 +241,7 @@ namespace XmlOutputFunctions
outputStream << (char) character;
break;
}
// Note: deliberate fall-through here!
// Note: Deliberate fall-through here!
default:
outputStream << "&#" << ((int) character) << ';';
break;
@ -580,7 +580,7 @@ void XmlElement::setAttribute (const Identifier& attributeName, const int number
void XmlElement::setAttribute (const Identifier& attributeName, const double number)
{
setAttribute (attributeName, String (number, 20));
setAttribute (attributeName, serialiseDouble (number));
}
void XmlElement::removeAttribute (const Identifier& attributeName) noexcept
@ -695,6 +695,8 @@ void XmlElement::removeChildElement (XmlElement* const childToRemove,
{
if (childToRemove != nullptr)
{
jassert (containsChildElement (childToRemove));
firstChildElement.remove (childToRemove);
if (shouldDeleteTheChild)
@ -923,4 +925,49 @@ void XmlElement::deleteAllTextElements() noexcept
}
}
//==============================================================================
#if JUCE_UNIT_TESTS
class XmlElementTests : public UnitTest
{
public:
XmlElementTests() : UnitTest ("XmlElement", "XML") {}
void runTest() override
{
{
beginTest ("Float formatting");
auto element = std::make_unique<XmlElement> ("test");
Identifier number ("number");
std::map<double, String> tests;
tests[1] = "1.0";
tests[1.1] = "1.1";
tests[1.01] = "1.01";
tests[0.76378] = "0.76378";
tests[-10] = "-10.0";
tests[10.01] = "10.01";
tests[0.0123] = "0.0123";
tests[-3.7e-27] = "-3.7e-27";
tests[1e+40] = "1.0e40";
tests[-12345678901234567.0] = "-1.234567890123457e16";
tests[192000] = "192000.0";
tests[1234567] = "1.234567e6";
tests[0.00006] = "0.00006";
tests[0.000006] = "6.0e-6";
for (auto& test : tests)
{
element->setAttribute (number, test.first);
expectEquals (element->getStringAttribute (number), test.second);
}
}
}
};
static XmlElementTests xmlElementTests;
#endif
} // namespace juce