Added more error checking to the converter.

This commit is contained in:
Steffen Fündgens 2015-01-19 11:15:41 +01:00
parent 60f24c762f
commit 4fa28b2088

View File

@ -247,6 +247,9 @@ void Converter::updateComposition(int idG, int idB, float posX, float posZ){
errorCheck(thisComposition->FirstChildElement("idGreen")->QueryIntText(&idGreen)); errorCheck(thisComposition->FirstChildElement("idGreen")->QueryIntText(&idGreen));
errorCheck(thisComposition->FirstChildElement("idBlue")->QueryIntText(&idBlue)); errorCheck(thisComposition->FirstChildElement("idBlue")->QueryIntText(&idBlue));
if(idGreen == idG && idBlue == idB){ if(idGreen == idG && idBlue == idB){
if (compositionExists){
std::cout << "An ID is used for multiple compositions in the xml." << std::endl;
}
bool manualPos; bool manualPos;
errorCheck(thisComposition->FirstChildElement("manualPos")->QueryBoolText(&manualPos)); errorCheck(thisComposition->FirstChildElement("manualPos")->QueryBoolText(&manualPos));
if(!manualPos){ if(!manualPos){