Removed unnecessary 'devices' element from TDFs

This commit is contained in:
Nav
2021-06-02 23:24:05 +01:00
parent 80749e2b5b
commit 5f580cc387
249 changed files with 182416 additions and 176806 deletions

View File

@@ -24,8 +24,7 @@ void TargetDescriptionFile::init(const QString& xmlFilePath) {
void TargetDescriptionFile::init(const QDomDocument& xml) {
this->xml = xml;
auto device = xml.elementsByTagName("devices").item(0)
.toElement().elementsByTagName("device").item(0).toElement();
auto device = xml.elementsByTagName("device").item(0).toElement();
if (!device.isElement()) {
throw TargetDescriptionParsingFailureException("Device element not found.");