Removing maybe unitiliazed errors.

This commit is contained in:
Faerbit 2015-02-24 10:50:11 +01:00
parent 320b765951
commit fd21dd0f9f

View File

@ -178,7 +178,7 @@ void Loader::load(std::string filePath, Level* level, std::string compositionsPa
float mass = queryFloat(xmlObject, "mass"); float mass = queryFloat(xmlObject, "mass");
XMLElement* constraint = thisComposition->FirstChildElement("positionConstraint"); XMLElement* constraint = thisComposition->FirstChildElement("positionConstraint");
bool rotate = (constraint == NULL); bool rotate = (constraint == NULL);
float dampningL, dampningA; float dampningL = 0.0f, dampningA = 0.0f;
if (physicType.compare("None") != 0){ if (physicType.compare("None") != 0){
dampningL = queryFloat(objectData, "dampningL"); dampningL = queryFloat(objectData, "dampningL");
dampningA = queryFloat(objectData, "dampningA"); dampningA = queryFloat(objectData, "dampningA");
@ -376,7 +376,7 @@ void Loader::load(std::string filePath, Level* level, std::string compositionsPa
int objectNum = queryInt(positionConstraint, "objectNum"); int objectNum = queryInt(positionConstraint, "objectNum");
int idGreen = queryInt(composition, "idGreen"); int idGreen = queryInt(composition, "idGreen");
int idBlue = queryInt(composition, "idBlue"); int idBlue = queryInt(composition, "idBlue");
int objectIndex; int objectIndex = 0;
bool ok = false; bool ok = false;
for (unsigned int i = 0; i<objectIdentifiers.size(); i++){ for (unsigned int i = 0; i<objectIdentifiers.size(); i++){
if (objectIdentifiers[i][2]==idGreen && objectIdentifiers[i][3]==idBlue && objectIdentifiers[i][4]==objectNum){ if (objectIdentifiers[i][2]==idGreen && objectIdentifiers[i][3]==idBlue && objectIdentifiers[i][4]==objectNum){