From 3c2062bdd08d2d2e02003d4bf84384b0dd552077 Mon Sep 17 00:00:00 2001 From: Damien Dupuis Date: Thu, 18 Nov 2010 15:13:56 +0000 Subject: [PATCH] Version property for tehcnology tag is not mandatory. --- vlsisapd/src/dtr/src/Techno.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vlsisapd/src/dtr/src/Techno.cpp b/vlsisapd/src/dtr/src/Techno.cpp index 79d97b4a..67826a92 100644 --- a/vlsisapd/src/dtr/src/Techno.cpp +++ b/vlsisapd/src/dtr/src/Techno.cpp @@ -92,13 +92,15 @@ Techno* Techno::readFromFile(const string filePath) { xmlChar* technoUnitC = xmlGetProp(rootElement, (xmlChar*)"unit"); xmlChar* technoVersC = xmlGetProp(rootElement, (xmlChar*)"version"); - if (technoNameC && technoUnitC && technoVersC) { + if (technoNameC && technoUnitC) { Name name ((const char*)technoNameC); Name unit ((const char*)technoUnitC); - Name vers ((const char*)technoVersC); + Name vers = Name(""); + if (technoVersC) + vers = Name((const char*)technoVersC); techno = new Techno(name, unit, vers); } else { - throw DTRException("[ERROR] 'technology' node must have 'name', 'unit' and 'version' properties."); + throw DTRException("[ERROR] 'technology' node must have 'name' and 'unit' properties."); return NULL; }